Useful tricks with SVN on Alioth

You have shell access on alioth, because of this you can often do most of the manipulations you need directly on the repository yourself. Some commonly asked for items:

Creating a new public SVN repository (for a new project)

When a project is freshly created, it automatically has a CVS repository. If you want to use SVN you have to change the type of repository used by your project, see ?Alioth/FAQ#vcs-repos.

When your repository has been created, you can access it thus: svn co svn+ssh://svn.debian.org/svn/reponame (which provides you with write access).

Importing a CVS repository

Install cvs2svn and generate the svn repository. Use the svnadmin dump command to get a dump file. Copy it to alioth. Use the svnadmin load command to import the repository. e.g.

$ scp svndumpfile.gz user@reponame.alioth.debian.org
$ ssh user@reponame.alioth.debian.org
user@alioth $ gunzip svndumpfile.gz
user@alioth $ svnadmin load /svn/reponame < svndumpfile
user@alioth $ rm svndumpfile

Setting up On-Commit notifications

Setting up commit notifications can be done directly in the repository. Please use svnmailer, it is installed on svn.debian.org and you can find very good example configuration file here: http://svn.debian.org/wsvn/collab-maint/lib/trunk/hooks/ (check files post-commit and svnmailer.conf).

http://svnbook.red-bean.com/svnbook-1.0/ch05s02.html#svn-ch-5-sect-2.1 gives instructions on how to do this and http://opensource.perlig.de/svnmailer/doc-1.0/ is the documentation of svnmailer.

Setting up SSH the first time

You should make sure you are connecting to the correct machine the first time you ssh into svn.debian.org. Your ssh client will offer you a fingerprint to check. If the fingerprint doesn't match, do not accept the connection, and let someone else know. The proper fingerprint should be the one mentioned in that mail:http://lists.debian.org/debian-devel-announce/2008/05/msg00004.html

Since svn.debian.org is hosted on alioth.debian.org, you must install SSH keys via the FusionForge web interface: http://alioth.debian.org/account/. Yes, you must. Do not do it manually or they will be removed when keys installed from FusionForge are installed.

To avoid problems with using different usernames on your local machine and Alioth, you can also add an entry for $HOME/.ssh/config, e.g.:

 Host svn.debian.org
 User foo-guest

Then try your login to svn.debian.org:

 $ ssh svn.debian.org
 Enter passphrase for key '/home/foo/.ssh/id_dsa': #type in your keyphrase#

If everything works, you can logout from svn.debian.org and checkout your SVN repository using:

 $ svn co svn+ssh://svn.debian.org/svn/pkg-bar

More information about setting up SSH is available in ?Alioth/SSH.

Web Interface

Q: Is there a Web Interface to SVN?