Apache Subversion

Apache Subversion ( SVN) is a free software for managing versions of files and directories.

Versioning is done in a central repository (English repository) in the form of a simple revision count. If changes to the content distributed to run on the computers of the processor, respectively transmit only the differences from existing stands between the repository and a workplace.

General

Subversion is released as free software under a license in the style of the Apache license.

The designation of "subversion" is made up of the words Sub and version, and can be understood as a version earlier version. Another interpretation has the name on the political- sociological term Subversion: back ( German " coup ", " decomposition "). However, it has not been documented by the developers if the pun is intended.

Subversion is understood as a further development of CVS and emerged as a response to widespread criticism of CVS. In the operation of the command line version, it is kept very similar.

With Subversion, it is - in contrast to CVS - for example, possible to move or rename without losing the version history of files or directories. Details can be found in the section differences to CVS.

With cvs2svn there is a converter that allows a CVS repository can be converted to Subversion. Also for the migration from other version control systems (such as PVCS, Visual SourceSafe, ClearCase, MKS, Perforce, StarTeam, ...) are different free import tools available.

History

Subversion has been developed since early 2000, CollabNet, reaching on 23 February 2004, the stable version 1.0. On 29 September 2004 released version 1.1, the biggest change was that project archives ( repositories ) can no longer be managed in a Berkeley database, but that measures to directly the file system can be used. In addition internationalized program expenditures have been made possible. The published on 23 May 2005 Version 1.2 now supports editing locks on files, which can be beneficial for binary files. Since 1 January 2006, there is version 1.3, the ("Performance " ) offers in the areas of server logging, authorization, programming connections, command options, and performance improvements. On September 10, 2006 Revision 1.4 was released, it brings the svnsync program, which allows you to mirror repositories ( repositories ).

Published on June 19, 2008 Version 1.5 Advanced Subversion to the so-called merge tracking, the documented merging of different subtrees. Version 1.6 was released on 20 March 2009 and expanded the merge tracking and security features. 2011 appeared to version 1.7, which stores the metadata only in the root directory and not, as previously in each subdirectory.

On 4 November 2009 gave former and new hoster in a joint press release announced that the project would go to decision CollabNet to the Apache Software Foundation. On November 7, 2009 Apache Subversion launched in Apache Incubator, since 17 February 2010, Apache Subversion, a top-level Apache project.

Differences to CVS

CVS is based on the older RCS system and thereof has taken over the internal storage format. This format is designed exclusively for the administration of the version history of individual files. CVS has chosen for managing projects with multiple files a very simple solution: The project is viewed as a collection of files, each of which in itself has its own history. In particular, in software development, but often go together changes to multiple files in a logical step. Thus, for example, must always include the implementation in foo.c to be adapted in a C project in adapting a function declaration in foo.h. That the step of foo.h to version 1.5 related to the step of foo.c to version 1.9 can not be displayed in the CVS. It can be concluded only by soft criteria such as proximity in time or the same commit message.

The schema version of Subversion refers therefore not to individual files, but in each case to the entire repository. This gets associated with each change a new "revision number". Thus, one can easily - and unlike CVS consistent - an exact version describe (eg "Revision 2841 " instead of " Version of 23 March 2004 20:56:31 UTC" ). The revision number of the file corresponds to the revision number in the repository, when it was changed the last time, the revision number of a directory corresponding to the highest revision number of files and directories. The sequence of revision numbers of each file can be quite patchy so if the file is not on every change (commit ) has been changed to the repository. For example, a file is added in the revision 25 to the repository and have been once each changed in revision 48 and revision 52. When retrieving ( checkout) a file the largest revision number is obtained, which is less than or equal to the requested. If, in the example, the revision 52 is requested, the revision 52 of the file is retrieved; is, however, requested the revision 51, Subversion provides the contents of Revision 48

Subversion stores the client side when creating a local copy ( checkout), when you update ( update) and transmit (commit ) a copy of each file, which is stored in a separate directory; this. svn directory exists once at the top level of the working copy. This doubles the memory requirements of a working copy, but this provides for remote repositories also some advantages. Thus, some actions, such as display of local changes, without network access take place, and subversion must when transferring only the changed portions of a file transfer, while CVS calculates the changes on the server side and therefore each must transfer the entire file. It is also possible to determine at any time or to withdraw the changes to a file in relation to its basic version, without consulting the repository.

Since the metadata contained in the. Svn directory are not desirable as on a production system, it is in the Subversion export command, which writes the files without the metadata. Svn folder in the file system. This distinguishes the export command from the system in a working copy ( checkout ).

The transfer of local changes (commits ) happens here in Subversion atomic, that is, a change - even multiple files - is stored either completely or not in the repository. Disconnections and multiple concurrent accesses can lead to inconsistent states thus.

With version 1.7.0 the metadata concept was completely changed. Rather than creating one. Svn folder in each subdirectory, the metadata is now stored in a single. Svn folder in the root directory of the working copy in a SQLite database.

Copies

Subversion is able to manage copies of files so that the copies of the same course of processing is common. This fact is particularly useful when changes to one of the files to be ported to the other. To create a copy of the files are not duplicated, but it is applied in-database link that can be used later in the same way as the original. From this technique is often referred to as " cheap copy " spoken. Copies are of particular interest for renaming and moving of files. Subversion realized this though, such as CVS, by making a copy of the original and marked as deleted, but it is not like in CVS at a fraction in the version history. A native support for moving and renaming is called on the developer side as a medium- term goal.

Tag and Branch Concept

In addition to the revised database model to the other version control systems completely different concept stands in the naming of file versions out (so-called tagging ) and the branch in variants ( Branching ). While the naming of tags and branches in most other version control systems like Git, Mercurial or CVS have a clear semantic meaning, Subversion knows only the concept of " cheap copy ", which depending on usage "tag " or " Branch - character " can have. Each copy in Subversion is therefore automatically a version of this file or directory. Roll labels are created in Subversion through a copy that should not be changed later. Because of the lack of a day or Branch semantics is responsible for the structuring and management of labels and branches the user and administrator. It has been proven for the projects directories trunk (English " tribe" ), branches (English " branches " ) and daytime (English " marks" ) to be created. trunk thereby contains the main line of development of the project, in branches subdirectories with alternative development paths are managed and invested in the day a copy of trunk or one of the branches as a subdirectory. For a better overview, depending on the project requirements, tags and branches still further divided into sub-directories. As HEAD refers to the latest version ("top revision" ) within a branch.

Because branches and tags only copies of the file system are inevitably generate a new commit when they are created. In addition, each developer must conform to the time semantics. Example, it is possible tags, and branches of parts of the file system or even the whole file system, including all existing tags and branches to create, subsequently to commit in a day or changes to create files or directories outside of the intended file structure. Thus, a compliant behavior can be prevented by server-side scripts.

Because files can be renamed version control in Subversion, the project structure at any time increase or decrease in requirements can be customized.

Others

Subversion in contrast to CVS, and other version control systems like SCCS, RCS or Git manage directories and metadata. In particular directories can also be marked as deleted. This is with CVS not possible here only empty directories can be deleted, they can not be deleted without loss of history of all files from the repository. Subversion provides improved handling of binary data. It detects such files ( such as images or audio files) largely automatic, and only the differences between the modified versions stored (as with text files). In CVS, the complicated goes on registration of the endings of binary files in cvswrapper, different versions of these file types but must always be stored completely.

The metadata enables the storage of attributes such as files that should be ignored, or those that are to be marked on systems that support it as executable. In addition to the predefined values ​​from SVN, which include about also merge information here, any other values ​​can be stored. However, these metadata are partially criticized as opaque, as they are well hidden, depending on the client and are partly set of Subversion itself.

Like CVS, Subversion provides network access on a separate server that can be accessed on the encrypted with SSH. In addition to this, and storage on the local file system, there is also a module for the Apache 2 web server with which the data can be transmitted with the HTTP / HTTPS WebDAV extension. Thus, the current revision of a file can also be accessed with a standard web browser.

Files that have been saved by a commit in the repository can be marked as deleted, but are then still with its entire history to display. Complete removal of files ( name and version history ) is not consistent with the principles of Subversion and can be carried out only with great effort as an administrator.

Subversion manages the entire repository in a database whose files do not reflect the structure of the repository content. The integrity of the database can be checked as directory boundaries. There are currently doing two backends are available. The added in version 1.1 fsfs backend uses its own format. The other back end uses the Berkeley database system, but this has the disadvantage that the data on the one hand - depending on the version used - subject to the binary incompatibilities, and on the other hand so that the introduced stability problems. This can have the consequence that a document created with an older version repository must be adapted to the new version. In addition, the access via NFS and Windows network shares is not possible.

Unlike CVS, Subversion defines the character encoding used for filenames and log messages in the repository. For example, files with umlauts in the names on systems with different character encodings (eg CP1252 ( German -language Windows) UTF -8 ( Linux) ) are used, while this does not work platform independent at CVS as this in the CVS client-server protocol is not defined. However, the discrepancies in characters in file names. UTF -8 both composed as can also be stored decomposed problems on MacOS -based systems This affects about umlauts in UTF -8 as a character ( Ä, composed ) and as two characters (A and ¨, decomposed ) can be stored.

Dependencies on subversion

For an installation of the basis functions only the Apache Portable Runtime library must be available since version 1.1.0. Previously was also a Berkeley DB in a version 4.0 or higher is necessary, but this is obsolete, since the repository using the FSFS backend can optionally also be stored directly in the file system.

Apache 2 and neon are required for WebDAV usage, Python 2.x for some provided test scripts, an SSL implementation if you want to encrypt WebDAV. Since version 1.4 can be used in place of neon for WebDAV alternatively Serf.

Repositories - such as CVS - set up by calling a command. This can be used for local access immediately. A server configuration procedure differs depending on the method chosen, but similar to that of other systems, CVS included.

With the WebDAV module of the Apache HTTP Server directly to the actual server process for Subversion repositories. The Subversion Content will be addressed via an ordinary URL via HTTP. Using a standard web browser can be a repository to be searched (at least the current version). Since Subversion hence the normal HTTP uses port 80, no additional configuration of firewall or similar is often necessary.

Subversion can also be used with its own independent Apache server process. This uses a proprietary network protocol which - because optimized for Subversion - is more efficient than the Apache module. The default port is 3690th

Distributions

A larger number of volunteers maintains various binary distributions of Subversion, usually several per target system. Also, binary distributions are issued on different terms from relevant companies. The Apache Subversion project does not issue official recommendations for certain distributions, but maintains a page with links to the known distributions him.

Graphical User Interfaces

There are some sophisticated graphical user interfaces ( GUIs) for Subversion. They make it very easy to users to access a Subversion repository. Here are some applications:

  • Cornerstone: Mac OS X, proprietary
  • Kdesvn: Linux ( KDE), open source
  • RapidSVN: Linux ( Gnome), Windows, Open Source
  • SmartSVN: Mac OS X, Windows, Linux, OS / 2, proprietary
  • Subcommander: Mac OS X, Windows & Linux, Open Source
  • SvnX: Mac OS X, Open Source
  • Versions: Mac OS X, proprietary
  • ZigVersion: Mac OS X Freeware
  • TkCVS: Unix / Linux, Windows, and MacOS X

Built- in file browser:

  • RabbitVCS: Linux ( Gnome)
  • SCPlugin: Mac OS X (up to version 10.5), open source
  • SmartSVN: Mac OS X, Windows, proprietary
  • TortoiseSVN: Windows, Open Source

Integrated into development environments:

Built- in editors:

  • BBEdit: Mac OS X
  • OXygen ( editor): Mac OS X, Windows, Linux
  • TextMate: Mac OS X
  • CODA Web Editor version 1.5 by Panic Inc.: Mac OS X

Furthermore plugins for NetBeans, KDevelop, Code :: Blocks, Vim, TYPO3 and ASCET are available. The global administration ( user rights, protocols, ...) is still performed on special SVN own configuration files.

To view a Subversion repository only, to many open source projects provide a link to their web service. This presents in a concise way, the contents of files, directories and log books; also file comparisons are possible.

72155
de