Translation(s): English - Italiano

(!) ?Discussion


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@vasks.debian.org
$ ssh user@vasks.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). You'll need to place them at /srv/svn.debian.org/svn/reponame/hooks.

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 on Alioth/SSH#Logging_in_for_the_first_time.

Since svn.debian.org is hosted on one of the Alioth machines, you must install SSH keys via the FusionForge web interface: https://alioth.debian.org/account/editsshkeys.php. 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.

Setting up git-svn client

Instead of using the native Subversion client, you may use git-svn client. For example, you can create a local Git repository with a shallow history from the alioth SVN repository with standard archive structure using:

 $ git svn clone -s -rHEAD svn+ssh://svn.debian.org/svn/pkg-bar

See git-svn manual page for "git svn rebase", "git svn dcommit", ...