UoC crest

Software Repository Server

All use of this server is governed by its Acceptable Use Policy. Use of the server is considered acceptance of this policy.

As ever, these instructions assume that your user name is spqr1 throughout.


Version Control with Subversion

Subversion is generally considered to be a superior replacement for CVS, itself a superior replacement for earlier revision control systems such as RCS and SCCS. These pages are not meant primarily as an introduction to SVN (SubVersioN), but rather to draw attention to how to use the TCM repository server with SVN (or CVS, for those with legacy projects).

Subversion obeys the usual UNIX file permissions, and, unlike the rest of TCM, the repository server uses a separate group for every user, and defaults to having files group writable and world readable. One can place a command such as umask 007 in one's .bashrc file to turn off world readability if desired.

To repeat, by default files on this server are visible to anyone with accounts on the machine, but are not visible via the web interface.

To Start

First, type
from a TCM PC. This should log you in, and immediately throw you out, having announced that it has created a home directory for you. Then repeat, and you should be left logged in. Your default quota is small. Well, actually it is huge: this service is meant for source files, not data. If you type one character a second, 24 hours a day, 365 days a year, for three years, you will not fill it.

You are now sitting on a firmly firewalled machine, with very few commands available. However, everything you need should exist. Don't try making outgoing network connections: it won't work.

Getting started with Subversion

You must first initialise an empty repository,

cvs-chroot:~$ svnadmin create foo
cvs-chroot:~$ ls foo
README.txt  conf  dav  db  format  hooks  locks

Then simply change to the root directory of the project you wish to import, and import it:

pc0:~/foo-src$ svn import svn+ssh:// -m 'Initial import'
Although SVN needs the full location specified much less often than CVS does, you may still get bored and wish to remember that shell variables exist:
pc0:~/foo-src$ REPO='svn+ssh://'
pc0:~/foo-src$ svn import $REPO/foo -m 'Initial import'
It is likely that you will wish to branch your project at some point in the future, so it is best to import one subdirectory down from the root of the repository:
pc0:~/foo-src$ svn import svn+ssh:// -m 'Initial import'

Remember that this does not create a `working copy.' To create same, one needs to checkout from the repository.

pc0:~/work$ svn checkout  $REPO/foo/trunk

Subversion stores a lot of data in a .svn directory associated with each copy checked out. This includes the location of the master copy, so subsequent svn commands do not specify that. Also a duplicate copy of all files at the time of checkout, so one can track changes made to the working copy in the absence of a network connection. The server keeps no record of working copies - there is no need to tell the server should you lose a working copy.

A minimum set of svn commands to know to make progress might be:

Note that of the above only commit, update and status -u contact the server (and require a network connection).

For full details of Subversion, see Version Control with Subversion, a paper copy of which exists in TCM.

Getting started with CVS

So you want to use a system which, by default, defaults to versioning individual files not the whole project, and which has non-atomic commits of multiple files? Oh. Will not convince you either?

tcmpc0:~/foo-src$ export CVS_RSH=ssh
tcmpc0:~/foo-src$ export
tcmpc0:~/foo-src$ cvs init
tcmpc0:~/foo-src$ cvs import barmy barmy v1-00

Using the Web Interface

The web interface provides read-only access, optionally password protected. It is fully described under a respository web frontend page. By default it will not serve any of your files, so, if you don't want it, it can safely be ignored.

Passwordless access from non TCM computers

Standard public key authentication is supported. Take care to ensure that one's .ssh directory and authorized_keys file do not end up group-writable, as sshd will then refuse to read them. Details for those unfamiliar with public key authentication can be found on a page dedicated to passwordless access to cvs.tcm.

Accounts for Third Parties

I believe that cvs.tcm is sufficently firewalled that an account on it cannot be said to be giving access to the CUDN. I shall certainly be happy to create accounts for collaborators more casually than I am on TCM's main network. Such accounts will be accessable via public key authentication only (see above), and can either be identical to other accounts on cvs.tcm, or restricted to running svn and cvs commands via rbash. However, if web-based download access suffices, then no account is necessary.

To create such an account, I need an email address, a public key, and an email from someone with a TCM account to say that it's a good idea.


For files stored under svn and cvs, it should be possible to roll back inappropriate changes using the version control mechanisms. However, for your convenience a read-only /snapshots directory exists too. This is on a separate physical disk in the same box as the home directories, and should contain snapshots from last night, last week and last month. The first file listed in each directory is the date and time stamp of the snapshot contained therein. If copying things back from this directory, remember that you may need to use "cp -p" to preserve acls.

A Real Example

For a transcript of mjr getting his data in order, try here.

A Real Download-Only Example

If all you wish to do is download from other projects, rather than host your own, life is easier, as this link shows.

A Multi-user Project Example

A transcript of a rare collaboration between mjr19 and mjr.


If something useful is missing from cvs, do let me know. If adding it would involve the X11 libraries, or making writable directories also executable, the answer will be "no".