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.
November 15th, 2010 at 3:13 pm
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.
January 20th, 2011 at 2:46 am
Brilliant! Concise and Correct recipe.
December 3rd, 2011 at 3:49 am
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 .