Subversion Code Versioning System FAQ

What is Subversion?

Subversion is a client-server based source code versioning system. It allows you (or a group of colleagues) to save all changes to a set of files to a central code repository. Besides simply storing copies of your software, you can use Subversion to revert the current copy of your code back to any previous version.

The basic steps in the Subversion cycle are:

  1. Create a repository. This requires asking the Subversion server to reserve some location for you.
  2. Check out a local copy of the repository. Even though the repository is empty at this point, checking out the repository creates a link between your local copy and the repository.
  3. Add any new code files and directories to your local copy.
  4. Add any new code files and directories to the repository.
  5. Commit your new code files and directories, as well as any modified code files to the repository.
  6. Modify your local copy files and directories further, then repeat steps 3-5.

Do I need Subversion?

Subversion is a great tool for helping you keep track of the code you write. However, as it is only an aid for writing your code, you do not have to use it unless it is a required element of your course(s). You can read this general article to determine if you want to use Subversion.

What do I need in order to use the CS Subversion server?

You need to be registered in at least one CMPT course in order to use the CS Subversion server. If you are, subversion repository is created automatically for you for each CMPT course you are registered in.   Note that some CMPT instructors will also setup group subversion repositories for their courses, so check with your instructor.


Can I install a Subversion server on my computer?

Of course! Subversion is open-source, so you are free to download and install a Subversion server on your own computer. The Subversion server is available for all major platforms.

Please note: if you are using a Subversion server on your own computer for course work, do not expect that your TAs or instructors will be able to, or want to, access your code repository in order to mark your work.

How do I use the Subversion client?

Besides having access to a Subversion server, you will also need access to a Subversion client. For Windows users in CSIL, the installed client is Tortoise SVN. Tortoise SVN is freely available for Windows users. For Linux users in CSIL, "svn" is installed as a command-line client.

After Tortoise SVN is installed, you can right-click on any file or folder in the Windows Explorer (the Windows file manager - not Internet Explorer). You will see options for Tortoise SVN in the pop-up menu that appears. Read the Tortoise SVN documentation for more information on its options.

To use 'svn' at the Unix/Linux command line, check out the tutorial: SVN for Unix/Linux.

Where is the CS Subversion server?

On punch.cs.sfu.ca. CMPT course repositories for individuals are of the form:

https://punch.cs.sfu.ca/svn/CMPT{course-number}-{semester-number}-{userID}

For example, the URL for csilop taking CMPT275 in spring 2012 semester (1121) is:

https://punch.cs.sfu.ca/svn/CMPT275-1121-csilop

CMPT course group repositories are of the form:

https://punch.cs.sfu.ca/svn/CMPT{course-number}-{semester-number}-{group-name}

For more info...

See Greg Baker's Subversion in the Lab page.

Search Computing Science