Apache Subversion: Difference between revisions
Syncrosoft (talk | contribs) |
|||
Line 141: | Line 141: | ||
* [http://pysvn.tigris.org/ WorkBench], cross-platform, written with [[wxPython]] and pysvn, an alternative, [[Object orientated|OO-style]] [[Python (programming language)|Python]] binding for the Subversion library. |
* [http://pysvn.tigris.org/ WorkBench], cross-platform, written with [[wxPython]] and pysvn, an alternative, [[Object orientated|OO-style]] [[Python (programming language)|Python]] binding for the Subversion library. |
||
*[http://zigzig.com/ ZigVersion], a commercial [[Mac OS X]] Subversion client. |
*[http://zigzig.com/ ZigVersion], a commercial [[Mac OS X]] Subversion client. |
||
*[http://www.syncrosvnclient.com/ Syncro SVN Client], a cross platform application supporting all range of Subversion operations, in a very productive user interface. |
|||
===Web-based clients=== |
===Web-based clients=== |
Revision as of 08:58, 26 January 2007
Subversion is an open source application for revision control. Also commonly referred to as svn or SVN, 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.4, Subversion repositories can be accessed by the following means:
- Local filesystem or network filesystem,[1] 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.
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 URLs 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. Used when the working copy is needed with a specific EOL style. "native" is commonly used, so that EOL's match the users OS EOL style. Repositories may require this property on all files to prevent inconsistent line endings, which can be a problem in itself.
- 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
- This 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:date
- The date and time stamp of when the revision was made.
- svn:author
- The name of the user that submitted the change(s).
- svn:log
- The 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. The copied files take up little extra room in the repository because Subversion only saves the differences from the original files.
For example, the recommended repository for a project looks something like this:
- project/
- trunk/
- branches/
- new-interface/
- windows-port/
- tags/
- version-1.0/
- version-1.1/
- version-2.0/
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. Due to the differencing algorithm, creating a tag or a branch takes very little additional space in the repository.
Current issues
![]() | This section needs expansion. You can help by adding to it. (January 2007) |
A number of issues with Subversion have been identified by the developers as well as users.
- No atomic 'move' or 'rename' operation. As of version 1.4, Subversion currently implements moving (or renaming) of files with two operations on the same atomic transaction: a 'copy' to the new name followed by a 'delete' of the old name.
- Subversion currently lacks proper repository administration and management tools. That is, while it is very capable when data is added to the repository, it is much less capable at managing the repository as a whole. For instance, it is sometimes necessary to permanently edit the repository to change the structure in which versions are held or to permanently remove data that was checked into the repository in error. Subversion does not have tools which allow this to be done. The check-in level tools allow files and directories to be moved or deleted but earlier revisions will always hold the data in the old structure or hold the file that was deleted. The current solution to this sort of problem involves 'dumping' the repository, editing the resulting (possibly large) text file, and then recreating the repository. For simple renaming or removal of files this is fairly straight-forward, but other alterations can be more complex and hence error-prone.
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 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.
Like many open-source programs, the name "Subversion" is trademarked [1] and may only be used with the trademark holder's permission.
Related software
GUI front-ends/clients
- 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.
- JSVN, a proof-of-concept Java Swing client.
- kdesvn, another Subversion client for KDE.
- psvn.el A Subversion interface for Emacs.
- QSvn, another Qt-based Subversion client.
- RapidSVN, a cross-platform (Linux, Win32, Mac OS X) 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 SVNKit 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.
- tkSVN, a Tcl/Tk-based combined Subversion and CVS client.
- TortoiseSVN, a Windows shell (i.e. Explorer) extension.
- WorkBench, cross-platform, written with wxPython and pysvn, an alternative, OO-style Python binding for the Subversion library.
- ZigVersion, a commercial Mac OS X Subversion client.
- Syncro SVN Client, a cross platform application supporting all range of Subversion operations, in a very productive user interface.
Web-based clients
- FishEye, browser interface for CVS and Subversion version control repositories by Cenqua
- Insurrection, a web interface for Subversion
- sventon, a pure Java Subversion repository web browser (open source).
- SVN::Web, a highly-configurable client, written in Perl, that supports cgi, mod_perl1, and mod_perl2
- ViewVC, browser interface for CVS and Subversion version control repositories by Tigris
- 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
- WebSVN, a PHP based web interface of Subversion repositories
IDE
List of IDEs, which support or can be integrated with Subversion:
- Xcode is Apple Computer's Mac OS X IDE
- Microsoft Visual Studio
- AnkhSVN is a Visual Studio .NET addin. It allows to perform the most common Subversion operations from directly inside the VS.NET IDE
- VisualSVN is simple and reliable Subversion integration for Visual Studio 2003 and 2005
- PushOk SVN SCC PlugIn Another Visual Studio addin.
- Borland Delphi
- DelphiSVN Subversion integration for Borland Delphi
- Eclipse
- Subclipse is an open source project that integrates Subversion into Eclipse IDE
- Subversive Subversion plug-in for Eclipse IDE providing similar to CVS support
- EasyEclipse A software bundle that packages Eclipse and several other plug-ins and tools into a single installer. One of the Eclipse plug-ins included in this bundle is a Subversion plug-in
- Zend Studio
- KDevelop
- Emacs
- NetBeans
- subversion.netbeans.org Subversion integration for NetBeans IDE
- JDeveloper
- Eric Python IDE
- ActiveState Komodo
Other related software
- 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".
- FSVS - versions complete filesystems or directories (including modification time, owner, group and access-mode) into a subversion repository.
- GForge is an open source project that integrates Subversion with bug tracking, messaging, project hosting.
- Information currency svn (icsvn)command-line client.
- SVNKit is an open source project that is a 100% pure Java Subversion client library.
- Oxygen XML Editor's Subversion Client
- SVN Importer is a free tool for importing content from other version control systems to a Subversion (SVN) repository
- 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.
- SVN 1-Click Setup is an installer for setting up a Subversion repository on Windows.
- SVN2Log, SVN2Log generates changelogs from Subversion repository.
- WANdisco, Multi-site, replication add-on for remote Subversion repositories.
- Trac and Svnwiki - integrates Subversion with Wiki software
- Subversion сlient for FAR Manager
- SVNRevMailer SVNRevMailer is a small tool that e-mails reports of the changes in subversion repositories.
- StatSVN, StatSVN is an open source program that generates graphical reports about SVN repositories
- CVS2SVN is a Python script that converts existing CVS repositories to Subversion repositories.
See also
- List of revision control software
- Collaborative development environment (CDE)
- Comparison of revision control software
- SVK - which is compatible with SVN repositories, and avoids the large .svn metadata directories in the working copy
- SourceHaven - ports Subversion to an Oracle database and adds a web application for administration
References and notes
- ^ Berkeley DB relies on file locking and thus should not be used on (network) filesystems which do not implement them
- C. Michael Pilato, Ben Collins-Sussman, Brian W. Fitzpatrick; Version Control with Subversion; O'Reilly; ISBN 0-596-00448-6 (1st edition, paperback, 2004, full book online at http://svnbook.red-bean.com/)
- Garrett Rooney; Practical Subversion; Apress; ISBN 1-59059-290-5 (1st edition, paperback, 2005)
- Mike Mason; Pragmatic Version Control Using Subversion; Pragmatic Bookshelf; ISBN 0-9745140-6-3 (1st edition, paperback, 2005)
- William Nagel; Subversion Version Control: Using the Subversion Version Control System in Development Projects; Prentice Hall; ISBN 0-13-185518-2 (1st edition, paperback, 2005)
External links
- Official site
- A subversion wiki
- #svn, Subversion's IRC channel, on freenode
- Version Control with Subversion, an O'Reilly book available for free online
- Version control for non-programmers with Subversion
- CVS and Subversion: Combined Tutorial
- A Subversion user community
- Planet Subversion