1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Overview of Subversion (SVN)

Subversion (SVN) is a source code management tool. In order to retrieve data from a Subversion repository, you need a Subversion client. The official Subversion client is available for most Operating Systems, including Windows, Linux, BSD and Mac OS X. The official SVN client is a text-based command-line tool. Windows users may alternately use the TortoiseSVN instructions client, which is GUI-based.

The official Subversion client is included with Linux and BSD. Binaries for other platforms are available from the Subversion team.

Access

The official Subversion client uses a URL to access the Subversion repository. URLs for SourceForge.net-hosted Subversion repositories take the form (replacing PROJECTNAME with the UNIX group name of the project): https://PROJECTNAME.svn.sourceforge.net/svnroot/PROJECTNAME

For example, the Subversion repository for the filezilla project would be located at: https://filezilla.svn.sourceforge.net/svnroot/filezilla

Basic usage

Subversion is a complex tool, designed to be used by software developers. The following resources include command-line examples on how to use Subversion:

In the following usage examples, replace PROJECTNAME with the UNIX group name for the project whose repository you are accessing. Replace USERNAME with your SourceForge.net username. If prompted for a password, enter the password associated with your SourceForge.net account.

Read access

Subversion repository read access is provided to everyone, without the need to authenticate.

Read access includes these commands:

  • Checkout: svn co https://PROJECTNAME.svn.sourceforge.net/svnroot/PROJECTNAME/trunk
  • Update: svn update

Write access

Subversion repository write access is provided by the project administrator to selected project developers. Write operations require authentication using an authorized SourceForge.net username and password.

  • Commit: svn commit --username=USERNAME
  • Import: svn import https://PROJECTNAME.svn.sourceforge.net/svnroot/PROJECTNAME --username=USERNAME
  • Add: svn add CONTENT_TO_ADD

Testing SVN Commands

SVN requires practice to learn. Developers who are new to SVN may wish to create a local SVN repository on their workstation to experiment with SVN before making changes to their project SVN repository. To create a local SVN repository to work with, do the following:

# The following assumes /svnroot is a safe location for the
# SVN repository to be stored, modify accordingly should you need
# an alternate location.
$ mkdir ~/svnroot

# Initialize the repository
$ svnadmin create /svnroot

# Go to the directory that contains the content you want to put
# into a SVN module, in this case, the ~/source directory
$ cd ~/source

# Perform a SVN import
$ svn import file:///svnroot -m "initial import"
Adding src
Adding src/foo
Adding src/bar
Adding ~svnroot
Committed revision 1.

# Create a working copy from which to make changes and check them
# back into the repository, etc.
$ mkdir ~/working_copy
$ cd ~/working_copy
$ svn co file:///svnroot
A svnroot/src
A svnroot/src/foo
A svnroot/src/bar
Checked out revision 1.

With this configured, you can delete the entire repository directory and start from scratch, if needed. Any SVN operations that you want to run should be run from within the ~/working_copy directory to simulate the exact same experience you would have from within the working copy you would maintain for any SVN repository (be it on SourceForge.net or the test repository you configured following the above steps).

Getting Help

SourceForge.net provides support for the official Subversion client when accessing SourceForge.net-hosted repositories. When contacting us for assistance, please include the following details:

  • If the command you are trying looks like this:

$ svn checkin

  • Please provide us the (verbose) output of:

$ svn -v checkin