Setting Up Subversion

Here is how to set up Subversion for a user with a username of compton.


1. Log on to moons or trucks

Type

svnadmin create --fs-type fsfs svnrepository


this will create $HOME/svnrepository.

The--fs-type fsfsmeans that the repository will use the fsfs backend rather than the Berkley DB backend which too often gets corrupted. Also, the Berkley DB backend simply cannot be used on a remote fileserver like NFS. Refer to the SVN book (http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.ref.svnadmin.c.create) for more details.

Type pwd to show the full path to your home directory. For the example user compton this will show:

/nfs/student/c/compton


2. On your home machine you can then do

mkdir mysvn cd mysvn svn checkout

svn+ssh://compton@moons.cs.unm.edu/nfs/student/c/compton/svnrepository

That will check out your SVN repository via SSH.


3. To import your existing files from your local machine type

svn import <dir_to_import>

svn+ssh://compton@moons.cs.unm.edu/nfs/student/c/compton/svnrepository


4. Group access to a repository

If a group needs to be allowed access to a repository, execute the following commands:

chgrp -R <groupname> <svnrepository> chmod -R g+rw <svnrepository>