University of Southern Denmark
Addresses Phone/Email Directory Search Maps Vacant Positions
topimage

How to Setup a Subversion Repository at IMADA

Disclaimer: The following only works for people in the faculty group, i.e., students cannot use the following setup.

Suppose you want to create a Subversion repository for a project you work on together with a group of people at IMADA. Here is how to do it the right way.

Below the host andrea is used to issue subversion commands. It does not necessarily have to be andrea that is used, it can be any host having subversion installed.

First a UNIX group should be created:
ssh bach
addGroup groupname
addToGroup groupname user1
...
addToGroup groupname userN
Now log out of bach in order to refresh the groups.

Next the Subversion repository should be created with the right permissions:
ssh andrea
cd /home/SVN
svnadmin create projectname
chgrp -R groupname projectname
cd projectname
chmod g+rwxs .
find . -type f -print | xargs chmod g+rw
find . -type d -print | xargs chmod g+rwxs
Finally log out of andrea.

Now the project should be imported into the newly created repository:
svn import projectdirectory svn+ssh://andrea.imada.sdu.dk/home/SVN/projectname -m "First import"
Note that it is the files (and subdirectories) in projectdirectory that gets imported, not the directory structure leading up to projectdirectory.

Finally the subversion managed version of your project should be checked out:
svn checkout svn+ssh://andrea.imada.sdu.dk/home/SVN/projectname
Which will create a directory called projectname that contains your project. It is the files in this directory you should work on, and you can delete the directory that originally contained your project.

For a basic introduction to subversion, look here.