Apache Subversion

from Wikipedia, the free encyclopedia
Apache Subversion

Subversion logo
Basic data

developer CollabNet
Publishing year 2000
Current  version 1.14.0
( May 27, 2020 )
operating system AIX , GNU / Linux , Windows , macOS , * BSD , Solaris , OS / 400
programming language C.
category Version management
License Apache license 2.0
German speaking Yes
subversion.apache.org
Central administration of a repository with the help of Subversion.

Apache Subversion ( SVN ) is free software for the central version management of files and directories.

The versioning takes place in a central project archive ( repository ) in the form of a simple revision count. If changes to content are carried out distributed across the computers of the editors, only the differences to existing statuses are transferred between the project archive and a workstation.

General

Subversion is released as free software under an Apache- style license .

The term “Subversion” is made up of the words Sub and Version and can thus be understood as a subversion, an earlier version . The name was coined by Jim Blandy, who also defined the initial design of the Subversion memory. He saw the software as a further development of CVS , with the handling of version histories being changed in particular in response to widespread criticism of CVS. So it is with Subversion - as opposed to CVS - e.g. B. possible to move or rename files or directories without losing the version history. Details can be found in the section Differences from CVS . In contrast, the operation of the command line version is very similar.

With cvs2svnthere is a converter with which a CVS repository can be converted to Subversion. Various free import tools are also available for migrating from other version management systems (such as PVCS, Visual Source Safe , ClearCase , MKS, Perforce , StarTeam , ...).

history

Subversion has been developed at CollabNet since early 2000 .

On November 4, 2009, the former and new hosters announced in a joint press release that the project would change to the Apache Software Foundation at the decision of CollabNet . On November 7, 2009, Apache Subversion was launched in the Apache Incubator , and since February 17, 2010, Apache Subversion has been a top-level Apache project.

Publications

version Publication date Remarks
Older version; no longer supported: - June 5, 2000 CVS repository set up for joint development.
Older version; no longer supported: 0.9 February 15, 2002 Great progress with the repository converter cvs2svn, commands svn switchintroduced, source code reorganized and tidied up, build system renewed.
Older version; no longer supported: 0.14.0 July 23, 2002 First alpha version released.
Older version; no longer supported: 0.35.1 December 19, 2003 First beta version released.
Older version; no longer supported: 1.0 February 23, 2004 Version 1.0 completed.
Older version; no longer supported: 1.1 September 29, 2004 Project archives (repositories) can no longer only be managed in a Berkeley database , but also directly in the file system. Internationalized program editions.
Older version; no longer supported: 1.2 May 21, 2005 Edit locks on files, which can be beneficial for binary files.
Older version; no longer supported: 1.3 December 30, 2005 Improvements in the areas of server logging, authorization , programming language connections , command options and performance .
Older version; no longer supported: 1.4 September 10, 2006 New program svnsyncthat enables the mirroring of project archives (repositories).
Older version; no longer supported: 1.5 June 19, 2008 New functionality merge tracking , the documented merging of different subtrees.
Older version; no longer supported: 1.6 March 20, 2009 Improvements to merge tracking and security functions.
Older version; no longer supported: 1.7 October 11, 2011 Change in metadata management: Instead of .svnstoring metadata in folders in each subdirectory, it is now stored centrally in a single .svnfolder in the main directory of the working copy in a SQLite database.
Older version; no longer supported: 1.8 June 18, 2013 Local ( working copy ) moving / renaming of files is transparently supported, simplifications of the reintegration of subtrees, inherited properties and settings directly in the project archive.
Older version; no longer supported: 1.8.18 7th July 2017 Minor bug fixes, including for possible SHA1 collisions
Older version; no longer supported: 1.8.19 August 10, 2017 Security update to prevent client-side execution of arbitrary code (CVE-2017-9800).
Older version; no longer supported: 1.9 5th August 2015 New, improved FSFS file format version 7, new tool svnfsfs, experimental FSX file format, new svnsubcommand auth, server-side performance improvements, expansion of the tools svnadminand svnbench, 3-way conflict and diff3improvement, predictive blame.
Older version; no longer supported: 1.9.6 6th July 2017 Memory requirements reduced when using large amounts of merge metadata, individual error messages improved, consistency check now independent of hash algorithms in order to avoid SHA1 collisions, for example , other small bug fixes.
Older version; still supported: 1.9.10 January 11, 2019 Security update to prevent client-side execution of arbitrary code (CVE-2017-9800).
Older version; still supported: 1.10.4 January 11, 2019 Improved path-based authz, new interactive conflict resolver, LZ4 compression, FSFS format 8, shelving.
Older version; still supported: 1.11.1 January 11, 2019 Improved shelving, checkpointing, improved tree conflict resolution.
Older version; still supported: 1.12.0 April 24, 2019 Improved shelving, improved checkpointing, improvements to the interactive conflict resolver.
Older version; still supported: 1.13.0 November 30, 2019
Current version: 1.14.0 May 27, 2020
Legend:
Older version; no longer supported
Older version; still supported
Current version
Current preliminary version
Future version

particularities

Version scheme

Subversion's versioning scheme does not apply to individual files, but to the entire repository. This is assigned a new "revision number" with every change. In this way, an exact version of the project archive can be written simply and consistently (e.g. "Revision 2841" instead of "Version from March 23, 2004 20:56:31 UTC"). The revision number of a file corresponds to the revision number of the project archive at the time the file was last changed. The revision number of a directory corresponds to the highest revision number of all files and directories it contains. The sequence of the revision numbers of an individual file can therefore be incomplete if the file was not changed with every change ( commit ) to the repository. For example, a file might have been added to the repository at revision 40 and modified once at revision 48 and revision 52. When a file is checked ( checkout ), the greatest revision number that is less than or equal to the requested revision is obtained. In the example, if revision 52 is requested, revision 52 of the file is retrieved; if revision 51 is requested, however, Subversion delivers the contents of revision 48.

Change tracking

Subversion stores on the client side at every checkout , update and commit a file a copy of which in .svnis stored directory. This doubles the memory requirements of a working copy, but this also offers some advantages for remote project archives. For example, some actions, such as displaying local changes, can be performed without network access, and Subversion only has to transfer the changed parts of a file when transferring. It is also possible to determine or undo changes to a file compared to its basic version at any time without consulting the project archive.

Export command

Since the .svnmetadata contained in the folder is not wanted on a productive system, for example, there is a exportcommand in Subversion which writes the files to the file system without the metadata of the .svnfolder. This is what distinguishes an export from a checkout .

Atomic commits

Commits happen atomically in Subversion , which means that a change - even to several files - is either saved entirely or not at all in the repository . Disconnections and multiple simultaneous accesses cannot lead to inconsistent states.

"Cheap Copies"

Subversion can manage copies of files so that the copies share the same editing history. This fact is particularly useful when changes to one of the files are to be ported to the other. In order to create a copy, the files are not duplicated, but a database-internal link is created, which can then be used in the same way as the original. This technology is often referred to as a "cheap copy" .

Renaming and relocation concept

The copy concept is used to rename and move files: Subversion does this by making a copy and marking the original as deleted, with no break in the version history.

Native support for moving and renaming is mentioned on the developer side as a medium-term goal.

Tag and branch concept

In addition to the changed database model, the concept, which is completely different from that of other version management systems, stands out in the area of ​​naming file versions (so-called tagging ) and branching into variants (so-called branching ). While the naming of tags and branches in most other version management systems such as Git , Mercurial or CVS has a clear semantic meaning, Subversion only knows the concept of the "cheap copy", which is "tag" or "branch character" depending on the type of use. may have. Each copy in Subversion is therefore automatically a variant of this file or directory. Named identifications are created in Subversion by means of a copy that should not be changed later. Due to the lack of tag or branch semantics, the structuring and management of labels and branches is the responsibility of the user and administrator . It has proven useful to create the base directories trunk (German “trunk”), branches (German “branches”) and tags (German “markings”) for projects . The trunk directory contains the main development line of the project, in branches further subdirectories with alternative development paths are managed and in tags a copy of trunk or one of the branches is created as a subdirectory. For a better overview, tags and branches are divided into further subdirectories depending on the project requirements . The HEAD is the latest version ("top revision") within a branch.

Visualization of a Subversion project

Since branches and tags are only copies in the file system, a new commit is inevitably created when they are created. In addition, every developer must adhere to the specified semantics. So it is about possible during the day and branches of parts of the file system, or even the whole file system, including all existing tags and branches to create, in one day later in changes commit or create files or folders outside the intended file structure. Such irregular behavior can be prevented by server-side scripts.

Since files in Subversion can also be renamed under version control, the project structure can be adapted to increased or decreased requirements at any time.

Directories and Metadata

In contrast to CVS and other version control systems such as SCCS , RCS or Git , Subversion can also manage directories and metadata. In particular, directories can also be marked as deleted.

Binary files

Subversion offers improved handling of binary data . It recognizes such files (for example images or audio files) largely automatically, and (as with text files) only the differences between the changed versions are saved.

File deletion

Files that have already been saved in the repository through a commit can be marked as deleted, but are then still available with their entire history. A complete removal of files (including the version history) does not comply with the principles of Subversion and can only be carried out with great effort as an administrator.

Others

The metadata allows the storage of attributes such as files that should be ignored or those that should be marked as executable on systems that support this. In addition to the values ​​predefined by SVN, which also include merge information, any other values ​​can also be stored here. However, this metadata is sometimes criticized as being opaque, as it is well hidden depending on the client and is sometimes set by Subversion itself.

Like CVS, Subversion offers network access via its own server , which can also be accessed encrypted with SSH . In addition to this and the storage in the local file system , there is also a module for the Apache 2 web server with which the data can also be transferred with the HTTP / HTTPS extension WebDAV . This means that the current revision of a file can also be called up with a normal web browser.

Subversion maintains the entire repository in a database, the files of which do not reflect the structure of the repository's contents. The integrity of the database can thus be checked across all directories. There are currently two backends available. The fsfsbackend added in version 1.1 uses its own format. The other backend uses the Berkeley database system , but this has the disadvantage that, on the one hand, depending on the version used, the data is subject to its binary incompatibilities and, on the other hand, the stability problems it brings with it. This can mean that a repository created with an older version has to be adapted to the new version. In addition, access via NFS and Windows network shares is then not possible.

Subversion itself defines the character encoding that is used for file names and log entries in the repository. This means that files with umlauts in their names can also be used on systems with different character encodings ( e.g. CP1252 (German-speaking Windows), UTF-8 (Linux)). However, there are problems on macOS -based systems with characters in file names that can be stored in UTF-8 both composed and decomposed . This affects umlauts, for example, which in UTF-8 can be saved as one character (Ä, composed ) and as two characters (A and ¨, decomposed ).

Dependencies on Subversion

From version 1.1.0, only the Apache Portable Runtime library is required to install the basic functions . Before that, a Berkeley DB version 4.0 or higher was necessary, but this is no longer necessary since the repository can optionally be saved directly in the file system with the help of the FSFS backend .

Apache 2 and Neon are required for WebDAV usage, Python 2.x for some of the test scripts supplied, an SSL implementation if you want to encrypt WebDAV. As of version 1.4, Serf can also be used for WebDAV instead of Neon .

As with CVS , repositories are set up with a command. This means that you can work immediately with local access. Server configuration varies depending on the method chosen, but is similar to that of other systems, including CVS.

With the WebDAV module, the Apache HTTP server becomes the actual server process for Subversion repositories. The Subversion content is addressed via a normal URL using HTTP. A repository can be searched using a normal web browser (at least the current version). Since Subversion also uses the normal HTTP port 80, there is often no additional configuration of a firewall or similar. necessary.

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

Differences from CVS

Version scheme
CVS is based on the older RCS system and has adopted the internal storage format from it. This format is designed exclusively for the management of the version history of individual files. CVS has chosen a very simple solution for managing projects with multiple files: The project is viewed as a collection of files, each of which has its own history. In software development in particular, changes to several files often belong together in one logical step. For example, in a C project, when a function foo.hdeclaration is foo.cadapted, the implementation in must also be adapted. CVS cannot show that the step from foo.hversion 1.5 is related to the step from foo.cversion 1.9. It can only be deduced from soft criteria such as temporal proximity or the same commit message, or it can be specified explicitly by assigning a tag.
Change tracking
CVS calculates changes on the server side and therefore has to transfer the entire file for each transfer.
Renaming and moving
Renaming and shifting are also implemented in CVS by creating a copy and marking the original as deleted. In CVS, however, there is a break in the version history.
Deletion marking of directories
In CVS, only empty directories can be deleted; they cannot be deleted from the repository without losing the history of all contained files.
Binary file management
The extensions of the binary file cvswrappertypes to be managed must be entered in CVS , but different versions of files of these types must always be saved in full.
Character encoding for file names and logbook entries in the repository
Not encoded by CVS itself.

Distributions

A large number of volunteers maintain various binary distributions of Subversion, usually several per target system. Binary distributions are also issued by relevant companies at different conditions. The Apache Subversion project does not issue any official recommendations for specific distributions, but maintains a page with web links to the distributions known to it.

Graphical user interfaces

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

Integrated in file browser:

Integrated in development environments:

Integrated in editors:

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

To just look at a Subversion repository, many open source projects provide a link to their web service . This presents the contents of files, directories and logbooks in a clear form; file comparisons are also possible.

literature

  • C. Michael Pilato, Ben Collins-Sussman, Brian W. Fitzpatrick: Version control with Subversion - website of the free book project.
  • C. Michael Pilato, Ben Collins-Sussman, Brian W. Fitzpatrick, Version Control with Subversion , O'Reilly-Verlag, 3rd edition April 2009, ISBN 978-3-89721-897-0 .
  • Tobias Wassermann: Version management with Subversion , mitp-Verlag, 1st edition October 2006, ISBN 978-3-8266-1662-4 .
  • Frank Budzuhn: Subversion , Galileo Computing, 2nd updated and expanded edition 2007, ISBN 978-3-89842-879-8 .

Web links

Individual evidence

  1. Stefan Sperling: Apache Subversion 1.14.0 released . May 27, 2020 (accessed May 27, 2020).
  2. if the internationalization was taken into account when creating the installation package , as is the case with alagazam.net, for example . The output language is determined LC_ALLautomatically using the system variables ; all messages appear in German if (example for Windows :) is LC_ALL = de_DE.CP1252set. Packages for later installation of a language are not available with the command line client. This situation should not be confused with graphical interfaces suitable for Subversion such as TortoiseSVN , where German-language messages are only available after installing a language package.
  3. ^ Subversion book, Subversion's History
  4. Celebrating a Decade of Open Source Leadership. Retrieved August 20, 2020 .
  5. Apache Subversion Change Log Version 1.8.18. Apache Software Foundation, July 10, 2017, accessed August 8, 2017 .
  6. Stefan Sperling: Release Announcement for Apache Subversion 1.8.18. Subversion Dev: [ANNOUNCE] Apache Subversion 1.8.18 released. Apache Software Foundation, accessed August 8, 2017 .
  7. Apache Subversion Change Log Version 1.8.19. Apache Software Foundation, August 10, 2017, accessed November 20, 2017 .
  8. Philip Martin: Release Announcement for Apache Subversion 1.8.19. [SECURITY] [ANNOUNCE] Apache Subversion 1.8.19 released. Apache Software Foundation, August 10, 2017, accessed November 20, 2017 .
  9. Apache Subversion Change Log Version 1.9.6. Apache Software Foundation, July 5, 2017, accessed August 8, 2017 .
  10. Daniel Shahaf: release announcement for Apache Subversion 1.9.6. [ANNOUNCE] Apache Subversion 1.9.6 released. Apache Software Foundation, July 6, 2017, accessed August 8, 2017 .
  11. Apache Subversion Change Log Version 1.9.7. Apache Software Foundation, August 10, 2017, accessed November 20, 2017 .
  12. Daniel Shahaf: release announcement for Apache Subversion 1.9.7. [SECURITY] [ANNOUNCE] Apache Subversion 1.9.7 released. Apache Software Foundation, August 10, 2017, accessed November 20, 2017 .
  13. Apache Subversion 1.10 Release Notes. Apache Software Foundation, accessed January 19, 2019 .
  14. Apache Subversion 1.11 Release Notes. Apache Software Foundation, accessed January 19, 2019 .
  15. Apache Subversion 1.12 Release Notes. Apache Software Foundation, accessed April 26, 2019 .
  16. Apache Subversion 1.13 Release Notes. Apache Software Foundation, accessed December 11, 2019 .
  17. Apache Subversion 1.14 Release Notes. Apache Software Foundation, accessed May 28, 2020 .
  18. Explanation of the bubble-up method as the basis for "cheap copies" in SVN (English)
  19. Subversion bug tracker: Issue 898
  20. Problems with umlauts in file names on Mac OS X ( Memento from August 31, 2012 in the Internet Archive )
  21. Apache Subversion Binary Packages. Retrieved August 20, 2020 .