27 Oct 2007

migrating vom cvs to svn

cvs is a simple and robust versioning system. I have been using it for a long time and was quiet happy. Due to familiarity with cvs I have not considered changing to another system but some things are very annoying in cvs (renaming directories, tags or branches - anyone?).

Svn looks very promising because it uses a very similar interface compared to cvs, great! It seems to be faster, more flexible but still remains the simplicity of cvs. Also, there is broad support for svn in other applications such as eclipse, nautilus, kdevelop (to name a few) and bindings to many programming languages. Furthermore, there are conversion scripts to automagically convert cvs repos into svn repos.

Installation
As always, this instructions should work on a debian system (such as ubuntu, or debian etch).

sudo apt-get install -y subversion cvs2svn
(Optional packages)

Converting your CVS repository to SVN
The svn site has good interesting howto on how to use svn for a cvs user. This post will just cover the absolutely minimum to get you started.

Create a repository:
svnadmin create /usr/local/repos
Then import the old cvs repository:
cvs2svn --existing-svnrepos -s /home/svn/ /home/cvs/
That's it. your CVS Repository is now migrated.

Checking out your project
svn checkout file:///home/svn/trunk/parser /tmp/parser
Assuming your path to the repo is /home/svn and the module you want to checkout is called parser and the target directory is /tmp/parser you can checkout with the above command.

Nautilus integration
sudo apt-get install -y nautilus-script-collection-svn
To activate the subversion menu in nautilus, you must run this command manually:
nautilus-script-manager enable Subversion
Then restart nautilus. That's all folks. Have fun.

No comments: