Subversion is an open source application used for revision control. It is sometimes abbreviated to svn in reference to the name of its command line interface. Subversion is designed specifically to be a modern replacement for CVS and shares a number of the same key developers.
Features
- Commits are truly atomic operations. Interrupted commit operations do not cause repository inconsistency or corruption.
- Renamed/copied/moved/removed files retain full revision history.
- Directories, renames, and file metadata are versioned. Entire directory trees can be moved around and/or copied very quickly, and retain full revision history.
- Versioning of symbolic links.
- Native support for binary files, with space-efficient binary-diff storage.
- Apache HTTP server as network server, WebDAV/DeltaV for protocol. There is also an independent server process that uses a custom protocol over TCP/IP.
- Branching and tagging are cheap (constant time) operations.
- Natively client/server, layered library design.
- Client/server protocol sends diffs in both directions.
- Costs are proportional to change size, not data size.
- Parsable output, including XML log output.
- Open Source licensed — "CollabNet/Tigris.org Apache-style license"
- Internationalised program messages.
- File locking for unmergeable files ("reserved checkouts").
- Path-based authorization for svnserve.
- Python, Ruby, Perl, and Java language bindings.
- Full MIME support - the MIME Type of each file can be viewed or changed, with the software knowing which MIME types can have their differences from previous versions shown.
Repository access
As of version 1.3, Subversion repositories can be accessed by the following means:
- Local filesystem or network filesystem,
[Berkeley DB relies on file locking and thus should not be used on (network) filesystems which do not implement them] accessed by client directly.
- WebDAV/DeltaV (over http or https) using the mod_dav_svn module for Apache 2.
- Custom "svn" protocol, either plaintext or over SSH.
All three means can access both FSFS and Berkeley DB repositories.
License
Subversion is distributed under an
Apache/
BSD-style license. Some have critcized the license for being incompatible with the
GPL version 2, although version 3 of the GPL is expected to solve the problem.
Layers
Subversion is composed internally of several libraries arranged as layers. Each performs a specific task and allows developers to create their own tools at the desired level of complexity and specificity.
- Fs : The lowest level, it implements the versioned filesystem which stores the user data.
- Repos : Concerned with the repository built up around the filesystem. It has many helper functions and handles the various 'hooks' that a repository may have e.g. scripts that are run when an action is performed. Together, Fs and Repos constitute the "filesystem interface".
- mod_dav_svn : Provides WebDAV/DeltaV access through Apache 2.
- Ra : Handles "repository access", both local and remote. From this point on, repositories are referred to using URL's i.e file:///path/ for local access, http://host/path/ (or https) for WebDAV access, or svn://host/path/ (or svn+ssh) for the SVN protocol.
- Client, Wc : The highest level. It abstracts repository access and provides common client tasks e.g authenticating the user, comparing versions. The Wc library is used by Client to manage the local working copy.
Filesystem
The Subversion filesystem is described as a "three dimensional" filesystem. Since most representations of a directory tree (e.g tree view) are two dimensional, the added dimension is that of revisions. Each revision in a Subversion filesystem has its own root, which is used to access contents at that revision. Files are stored as links to the most recent change, thus a Subversion repository is quite compact. The storage space used is equivalent to the changes made, not the number of revisions.
The Subversion filesystem uses transactions to keep changes atomic. A transaction is begun from a specified revision of the filesystem, not necessarily the latest. The transaction has its own root, on which changes are made. The transaction is then either committed and becomes the latest revision, or is aborted. The transaction is actually a long-lived filesystem object. A client does not need to commit or abort a transaction itself. A client can begin a transaction, exit, and then another client (perhaps the same program) can re-open the transaction and continue using it.
Properties
One important feature of the Subversion filesystem is properties, simple name=value pairs of text. Properties are used in two different places in the Subversion filesystem. The first is on filesystem entries i.e files and directories. These are versioned just like other changes to the filesystem. Users can add any property they wish, and the Subversion client uses a set of properties, which it prefixes with 'svn:'.
- svn:executable : Makes files on Unix-hosted working copies executable.
- svn:mime-type : Stores the MIME type of a file. Affects the handling of diffs and merging.
- svn:ignore : A list of filename patterns to ignore in a directory. Similar to CVS's .cvsignore file.
- svn:keywords : A list of keywords to substitute into a file when changes are made. The keywords must also be referenced in the file as $keyword$. This is used to maintain certain information (e.g date of last change, revision number) in a file without human intervention.
- svn:eol-style : Makes the client convert end-of-line characters in text files. Needed for environments that mix systems and a file is needed with a specific EOL style.
- svn:externals : Allows parts of other repositories to be automatically checked-out into a sub-directory.
- svn:needs-lock : Specifies that a file needs an explicit lock to be taken out on it before being modified, stopping other people from modifying it at the same time.
- svn:special : The only property that isn't meant to be set or modified directly by users. Currently only used for having symbolic links in the repository. When a symbolic link is added to the repository, an empty file is created with this property. When a Unix-like system checks out this file, the client converts it to a symbolic link.
Properties are also placed on revisions, usually storing the date, author, and description of a change. These properties are not versioned and can be changed later.
Related software
GUI front-ends/clients
- AnkhSVN is a Visual Studio .NET addin. It allows you to perform the most common Subversion operations from directly inside the VS.NET IDE.
- eSvn, a Qt-based Subversion client.
- gsvn, mostly abandoned by its original authors, due to lack of time; written entirely in python, using GTK+. There is a new project developed in C# with Mono also named gsvn.
- Insurrection, a web interface for Subversion.
- JSVN, a proof-of-concept Java Swing client.
- kdesvn, another Subversion client for KDE.
- psvn.el A Subversion interface for Emacs.
- PushOk SVN SCC PlugIn Another Visual Studio addin.
- RapidSVN, a cross-platform (Linux, Win32) GUI front-end written in C++ using the wxWidgets framework.
- SCPlugin, a Mac OS X plug-in for the Finder.
- SmartSVN is a cross-platform (Linux, Mac OS X, Win32) client for Subversion; available as a free Foundation version and as a commercial Professional version. It makes use of the JavaSVN library, a 100% pure Java implementation of Subversion.
- Subcommander, a cross-platform (Linux, Win32, Mac OS X) GUI front-end written in C++ using the Qt framework.
- svnX, a Mac OS X GUI front-end to command line Subversion.
- TortoiseSVN, a Windows shell (i.e. Explorer) extension.
- TurtleSVN is a Visual Studio .NET addin to work with Subversion using TortoiseSVN.
- VisualSVN - simple and reliable Subversion integration for Visual Studio 2003 & 2005.
- WebSVN, a PHP based web interface of Subversion repositories.
- WebClient for SVN an open source cross-platform (Linux, Win32, Mac OS X) Subversion web client written in Java/JSP. It offers a convenient way of browsing the repository content and its history plus simple write operations.
- ZigVersion, a commercial Mac OS X Subversion client.
Other projects of note
- Subversive Subversion plug-in for Eclipse providing similar to CVS support.
- The open source Subclipse project integrates Subversion into Eclipse.
- The open source JavaSVN project is a 100% pure Java Subversion client library.
- SVN Importer is a free tool for importing content from other version control systems to a Subversion (SVN) repository
- CIA is a piece of software that notifies people of repository activity. It is named after the CIA because its role is to "keep an eye on subversion".
- Information currency svn (icsvn)command-line client.
- svnmerge, which helps keep track of what changes what merges have and have not occurred on branches.
- SVNManager, SVNManager is a webbased tool to administer a Unix Apache WebDAV Subversion repository server.
Users
Although
as of 2006 Subversion is less widely used than the traditional
CVS, adoption is increasing, and it is perhaps the most popular alternative. Projects using Subversion include the
Apache Software Foundation,
KDE,
GCC,
R,
Python,
Samba,
Mono,
PuTTY,
Zope,
Xiph,
GnuPG,
CUPS,
Wireshark,
TWiki,
Ruby on Rails, and many others. Many projects have migrated to Subversion due to the comprehensive project management solution
Trac, which requires Subversion.
See also
References and notes
- C. Michael Pilato, Ben Collins-Sussman, Brian W. Fitzpatrick; Version Control with Subversion; O'Reilly; ISBN 0596004486 (1st edition, paperback, 2004, full book online at http://svnbook.red-bean.com/)
- Garrett Rooney; Practical Subversion; Apress; ISBN 1590592905 (1st edition, paperback, 2005)
- Mike Mason; Pragmatic Version Control Using Subversion; Pragmatic Bookshelf; ISBN 0974514063 (1st edition, paperback, 2005)
- William Nagel; Subversion Version Control: Using the Subversion Version Control System in Development Projects; Prentice Hall; ISBN 0131855182 (1st edition, paperback, 2005)
External links
Free revision control software
Subversion | Subversion | Subversion (Software) | Subversion | Subversion (logiciel) | Subversion | Subversion | Subversion | Subversion | Subversion | Subversion | Subversion | Subversion | Subversion | Subversion | Subversion