SVN: Apache Subversion

Apache Subversion (often abbreviated SVN, after its command name svn) is a software versioning and revision control system distributed as open source under the Apache License. Software developers use Subversion to maintain current and historical versions of files such as source code, web pages, and documentation. Its goal is to be a mostly compatible successor to the widely used Concurrent Versions System (CVS).

The open source community has used Subversion widely: for example in projects such as Apache Software Foundation, Free Pascal, FreeBSD, GCC and SourceForge. CodePlex offers access to Subversion as well as to other types of clients.

Subversion was created by CollabNet Inc. in 2000, and is now a top-level Apache project being built and used by a global community of contributors.

Releases

CollabNet founded the Subversion project in 2000 as an effort to write an open-source version-control system which operated much like CVS but which fixed the bugs and supplied some features missing in CVS. By 2001, Subversion had advanced sufficiently to host its own source code, and in February 2004, version 1.0 was released. In November 2009, Subversion was accepted into Apache Incubator: this marked the beginning of the process to become a standard top-level Apache project. It became a top-level Apache project on February 17, 2010.

Version Original Release Date Latest Version Release Date Status
1.0 2004-02-23 1.0.9 2004-10-13 No longer supported
1.1 2004-09-29 1.1.4 2005-04-01 No longer supported
1.2 2005-05-21 1.2.3 2005-08-19 No longer supported
1.3 2005-12-30 1.3.2 2006-05-23 No longer supported
1.4 2006-09-10 1.4.6 2007-12-21 No longer supported
1.5 2008-06-19 1.5.9 2010-12-06 No longer supported
1.6 2009-03-20 1.6.23 2013-05-30 No longer supported
1.7 2011-10-11 1.7.22 2015-08-12 No longer supported
1.8 2013-06-18 1.8.17 2016-11-29 Partially supported
1.9 2015-08-05 1.9.5 2016-11-29 Fully supported

Branching and Tagging

Subversion uses the inter-file branching model from Perforce to implement branches and tagging. A branch is a separate line of development. Tagging refers to labeling the repository at a certain point in time so that it can be easily found in the future. In Subversion, the only difference between branches and tags is how they are used.

A new branch or tag is set up by using the svn copy command, which should be used in place of the native operating system mechanism. The copied directory is linked to the original in the repository to preserve its history, and the copy takes very little extra space in the repository.

All the versions in each branch maintain the history of the file up to the point of the copy, plus any changes made since. One can merge changes back into the trunk or between branches.

Subversion_project_visualization

Limitations and Problems

A known problem in Subversion affects the implementation of the file and directory rename operation. As of 2014, Subversion implements the renaming of files and directories as a “copy” to the new name followed by a “delete” of the old name. Only the names change, all data relating to the edit history remains the same, and Subversion will still use the old name in older revisions of the “tree”. However, Subversion may become confused when a move conflicts with edits made elsewhere, both for regular commits and when merging branches. The Subversion 1.5 release addressed some of these scenarios while others remained problematic. The Subversion 1.8 release addressed some of these problems by making moves a first-class operation on the client, but it is still treated as copy+delete in the repository.

As of 2013, Subversion lacks some repository-administration and management features. For instance, someone may wish to edit the repository to permanently remove all historical records of certain data. Subversion does not have built-in support to achieve this simply.

Subversion stores additional copies of data on the local machine, which can become an issue with very large projects or files, or if developers work on multiple branches simultaneously. In versions prior to 1.7 these .svn directories on the client side could become corrupted by ill-advised user activity like global search/replace operations. Starting with version 1.7 Subversion uses a single centralized .svn folder per working area.

Subversion does not store the modification times of files. As such, a file checked out of a Subversion repository will have the ‘current’ date (instead of the modification time in the repository), and a file checked into the repository will have the date of the check-in (instead of the modification time of the file being checked in). This might not always be what is wanted.[32] To mitigate this, third-party tools exist that allow for preserving modification time and other filesystem meta-data. However, giving checked out files a current date is important as well — this is how tools like make will take notice of a changed file for rebuilding it.

Subversion uses a centralized revision control model. Ben Collins-Sussman, one of the designers of Subversion, believes a centralised model would help prevent “insecure programmers” from hiding their work from other team members. Some users of version control systems see the centralised model as detrimental; famously, Linus Torvalds attacked Subversion’s model and its developers.

Subversion often does not deal well with the filename normalization performed by the HFS+ filesystem. This can cause problems when files with accented characters in their names are added to the repository on a non-HFS+ filesystem and the repository is then used with HFS+.

SVN Clients

  • TortoiseSVN: 在windows非常受到欢迎的一套客户端软件,它与资源管理器集成得相当不错,可以通过资源管理器在文件或目录上用鼠标右键的菜单完成SVN的操作。

  • SnailSVN: Mac OS X 平台下类似 TortoiseSVN 的图形化 SVN 客户端,可自动标记文件状态,并通过右键菜单提供各种常用 SVN 功能。

  • Ankhsvn: 将subversion的操作集成进Visual Studio的SVN 客户端软件。

  • Subclipse: 将Subversion的操作集成进Eclipse的SVN 客户端软件。

  • Subversive: 和Subclipse相同。

  • SCPlugin: Mac OS下类似TortoiseSVN的软件。

  • SVNx: Mac OS X下的一款客户端软件。

  • eSVN: Unix下类似TortoiseSVN的软件。

  • kdesvn: Linux下使用KDE桌面管理下类似TortoiseSVN的软件。

  • RabbitVCS: Linux下使用Gnome桌面管理下类似TortoiseSVN的软件。

  • GTalkabout: Windows下集成了讨论功能的客户端软件。

References