|
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 Repository access As of version 1.4, Subversion repositories can be accessed by the following means: All three means can access both FSFS and Berkeley DB repositories. 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. FsThe lowest level, it implements the versioned filesystem which stores the user data. ReposConcerned 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_svnProvides WebDAV/DeltaV access through Apache 2. RaHandles "repository access", both local and remote. From this point on, repositories are referred to using URL's i.e file:///path/ for local access, Client, WcThe 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:executableMakes files on Unix-hosted working copies executable. svn:mime-typeStores the MIME type of a file. Affects the handling of diffs and merging. svn:ignoreA list of filename patterns to ignore in a directory. Similar to CVS's .cvsignore file. svn:keywordsA 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-styleMakes the client convert end-of-line characters in text files. Used when a file is needed with a specific EOL style in an environment with mixed systems. svn:externalsAllows parts of other repositories to be automatically checked-out into a sub-directory. svn:needs-lockSpecifies 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:specialThis property 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. The second place in Subversion where properties are used is on revisions themselves. Like the above properties on filesystem entries the names are completely arbitrary, with the Subversion client using certain properties prefixed with 'svn:'. However, these properties are not versioned and can be changed later. svn:dateThe date and time stamp of when the revision was made. svn:authorThe name of the user that submitted the change(s). svn:logThe user-supplied description of the change(s). Branching and tagging Unlike CVS, Subversion does not handle branches or tags (releases) itself. These features are instead achieved using different paths within the repository and simply copying trees of files and directories between these paths. These copies are made using the 'svn copy' command, not the native operating system mechanism. Because Subversion implements file copies, the copied files retain the full history of the original file. They also take up little extra room in the repository. For example, the recommended repository for a project looks something like this: It is not intended that someone check-out the entire project tree, instead only checking out the trunk or one of the branches or tags. The trunk directory holds the main copy of this project, called the 'HEAD' branch in CVS. The branches directory holds versions of the project that a developer or group of developers may be working on. They allow changes to be checked into the repository and shared with others, without possibly introducing problems into the trunk. The changes can be merged into the trunk or other branches. The tags directory contains snapshots of the trunk at particular milestones, usually major releases or perhaps prior to a major departure in development. The branches and tags were made by simply copying the trunk to the new paths. All the files in each branch maintain the history of the file up to the point of the copy, plus any changes made since. Changes can be 'merged' back into the trunk or between branches. To Subversion, the only difference between tags and branches is that changes should not be checked into the tagged versions. Current issues A number of issues with Subversion have been identified by the developers as well as users. These and other issues are described in the Subversion roadmap. 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, , 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 originally required Subversion. SourceForge now also provides Subversion hosting for its open source projects, and the new Google Code uses it exclusively. License Subversion is distributed under an Apache/BSD-style license. Some have criticized the license for being incompatible with the GPL version 2, although version 3 of the GPL is expected to solve the problem. graphical user interface|GUI front-ends/clients Other related software See also | |||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||
![]() |
|
| |