Apache Subversion

Introduction

Apache Subversion (often abbreviated SVN, after the command name svn) is a software versioning and revision control system distributed under an open source license. 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).

Usage

Compute Systems Invocation Version(s)
Red Hat Linux (64-bit) % /util/bin/svn
% /util/bin/svnadmin
% /util/bin/svnserve
1.6.5 (default)

Tutorial

  1. Begin with an existing repository of data. In this example, the existing repository is a directory of C source code called ~kensmith/SRC.
  2. Create a directory to house your SVN repository:
    
    % mkdir /projects/kensmith/SVN
    
    
  3. Create a SVN repository:
    
    % svnadmin create /projects/kensmith/SVN
    
    
  4. Import your data into the repository:
    
    % svn import Src file:///projects/kensmith/SVN/Src -m "Initial import"
    
    
  5. You may now access the repository locally. To check out a copy from a remote machine (one without direct access to /projects) you can do:
    
    %  svn co svn+ssh://nickelback.cse.buffalo.edu/projects/kensmith/SVN/Src
    
    

    ... which will give you a local copy of the code. If you then work inside that directory on the remote machine you don't need to specify the full URL, just doing "svn up" to update or "svn commit" to commit changes works without needing to provide the URL to the repository.

Notes

  1. The Subversion Help function:
    
    % /util/bin/svn --help
    
    
    ... concludes with the official Subversion URL:
    
    Subversion is a tool for version control.
    For additional information, see http://subversion.tigris.org/
    
    
  2. The official Subversion URL links to the complete text of O'Reilly's Version Control with Subversion, available free of charge.

References

  1. http://en.wikipedia.org/wiki/Apache_Subversion
  2. http://subversion.apache.org/
  3. http://svnbook.red-bean.com/