converting sourceforge.net repository from CVS to subversion

Probably there is no need to switch from CVS to subversion, but I’m starting to forget the options of the cvs command, therefore decided to migrate. Unfortunately, there is no button “convert” on the site, therefore I had to find how to do it manually.

A quick search gave a migration notes of Audacity: CVS To SVN Migration. To get a better understanding what is happening, I read the following documents:

* Version Control with Subversion / Converting a Repository from CVS to Subversion
* cvs2svn Documentation

The dump was easy to produce:

$ rsync -av --delete-delay rsync://PROJECT.cvs.sourcefor
   ge.net/cvsroot/PROJECT/* PROJECT-cvsbackup/

$ cvs2svn --dumpfile=svndump PROJECT-cvsbackup > cvs2svn.log

The task of importing the dump was more challenging, but also easy solved thanks to the sourceforge documentation: Managing your Subversion Repository with adminrepo

This moves the dump on the sourceforge servers and logs in:

$ rsync -aiv svndump USER,PROJECT@web.sourceforge.net:.
$ ssh -t USER,PROJECT@shell.sourceforge.net create

And this what happens after logging in:

$ mv /home/groups/P/PR/PROJECT/svndump .
$ adminrepo --checkout svn
$ rm -rf /svnroot/PROJECT/*
$ svnadmin create /svnroot/PROJECT/
$ svnadmin load /svnroot/PROJECT < svndump
$ adminrepo --save

Project options

Remembered after writing this post: one must to activate subversion before doing the conversion:

Project admin -> Feature settings -> Available Features

After conversion, disable CVS.

6 Responses to “converting sourceforge.net repository from CVS to subversion”

  1. PypeBros Says:

    Thanks for the tip. Just one thing: make sure you’ve enabled SVN from the web administration first (at least, before you log into shell.sf.net): you’ll save yourself “unable to lock” and other similar trouble.

  2. shi Says:

    Brilliant! Concise and Correct recipe.

  3. dfernandez Says:

    Perfect. Trunk migrated, tags migrated… Thanks a lot!!!

    Just one little difference I found: for me this step:

    $ mv /home/groups/P/PR/PROJECT/svndump .

    …was, instead:

    $ mv /home/project-web/PROJECT/svndump .

  4. Arjohn Says:

    Thanks a lot, this saved me a lot of time.

    One comment: for some reason importing a large dump using the above “svnadmin load” command takes a lot of time. In my case, the shell timed out before the process could finish. Redirecting the stdout and stderr to a file solved that, allowing the process to finish in a couple of minutes.

  5. Antonio Scuri Says:

    If the CVS repository is in SourceForge also, and using the latest SourceForge features there are less steps necessary:

    0) Enable the SVN Tool in SourceForge interface
    1) Open a SourceForge shell
    2) unpack the cvs2svn.tar.gz. No need to install it.
    3) rsync -av –delete-delay rsync://PROJECT.cvs.sourceforge.net/cvsroot/PROJECT/* PROJECT-cvsbackup/
    4) cvs2svn-2.x/cvs2svn –dumpfile=svndump PROJECT-cvsbackup > cvs2svn.log
    5) svnadmin load /home/svn/p/PROJECT/MODULE

  6. olpa Says:

    There are still CVS SourceForge projects? A big surprise for me. Thanks to Antonio on behalf of those who still have not converted repositories and search for an easy way to do it.

Leave a Reply