

Subversion at CIS
The CIS department has provided a Subversion repository to each user account, as well as dedicated repositories for the research labs and special projects.
This page provides brief instructions on the specifics of the CIS setup and how to access and configure your repository. This is not intended to be a Subversion tutorial and the IT staff is not equipped to train users on the actual usage of Subversion. However, there are several good resources for learning Subversion, such as the online book:
Version Control with Subversion
Users of CVS will find the transition to Subversion is an easy one. Please see the book above for specific information regarding this transition.
Access to the CIS Subversion repositories is through http access only. We do not provide local filesystem access to the subversion repositories.
Users' Personal SVN Repository
Each CIS user is issued a personal SVN repository. This repository is located at https://svn.cis.uab.edu/users/username. Generally, you do not use a regular web browser to access your repository (doing so only gives you read-only access to the latest revision). Instead, you use a Subversion client. On the department's linux systems, this is in the form of the 'svn' command line program. On Windows we recommend using TortoiseSVN. Many development environments have built-in or add-on support for Subversion (e.g. Eclipse has the Subclipse add-on). Instructions on using these tools is beyond the scope of this document, but plenty of documentation is available at the command line for 'svn' ('svn help') and online for TortoiseSVN or Subclipse.
The access control for each repository is completely controlled by the owner via the file ~username/svnaccess/username.svnaccess found in your home directory. This file contains instructions regarding the syntax and usage of the file, and how to set up various project areas with different access permissions.
By default, each user's repository is set to allow full read-write access by themselves and no anonymous access or access by any other CIS users. This can be changed following the instructions in the access file.
A Basic Sample
As a teaser, here is a short sample session with Subversion. The output you see may be slightly different, and there may be a couple of extra steps the first time you connect, such as accepting the SSL certificate and providing your username and password.
Say you have a directory, "foo", that you would like to put under version control...
username@vulcan7 [svndemo]$ ls
foo
username@vulcan7 [svndemo]$ ls foo/
file1.txt file2.txt
You can import it into your repository by using the svn import command from the directory -above- the one you want to create in the repository (I want to create a foo directory, so I do it from its' parent directory svndemo).
username@vulcan7 [svndemo]$ svn import . https://svn.cis.uab.edu/users/username -m 'Initial import of foo'
Adding foo
Adding foo/file2.txt
Adding foo/file1.txt
Committed revision 86.
Once that's done, no more need for the local foo directory - the data is in the repository!
username@vulcan7 [svndemo]$ mv foo ~username/foo-old
Now I create a working copy to edit the files in foo.
username@vulcan7 [svndemo]$ svn co https://svn.cis.uab.edu/users/username/foo foo-working-copy
A foo-working-copy/file2.txt
A foo-working-copy/file1.txt
Checked out revision 86.
I enter my working directory and see what it looks like.
username@vulcan7 [svndemo]$ cd foo-working-copy/
username@vulcan7 [foo-working-copy]$ ls
.svn file1.txt file2.txt
It looks just like it did before it was under revision control. Let's change one of the files...
username@vulcan7 [foo-working-copy]$ echo "Adding more to file1.txt" >> file1.txt
Of course, I could have also changed it by editing it in an editor, as usual. Let's see if Subversion knows I changed it...
username@vulcan7 [foo-working-copy]$ svn status
M file1.txt
Yep, the M flag means that the version of file1.txt in this working copy is Modified from the version that is in the repository. I should check-in my changes now.
username@vulcan7 [foo-working-copy]$ svn ci -m 'I edited file1.txt'
Sending file1.txt
Transmitting file data .
Committed revision 87.
Now I try status again...
username@vulcan7 [foo-working-copy]$ svn status
username@vulcan7 [foo-working-copy]$
And I don't get any output, meaning that everything in the working copy is identical to that in the repository now. At any point in the future, I can revert file1.txt back to it's older version, or examine the differences that were made between the two versions, among lots of other possibilities.
This is a highly simplified view of the basic workflow when using a version control system. If you are interested in learning more, please see the link to the online book above.
Research Lab and Special Project Repositories
These repositories are administered by the faculty member in charge of the lab or project. Please contact those individuals if you need access to one of these repositories.