CVS to SVN conversion and reorganizing branches


I am converting from existing CVS repository to SVN repository. CVS repository has few brances and I'd like to rename branches while converting.

Wanted conversion is like this:

CVS branch         SVN branch
HEAD       ->      branches/branchX
branchA    ->      trunk
branchB    ->      branches/branchB
branchC    ->      branches/branchC

That is, CVS HEAD becomes a normal branch and CVS branchA becomes SVN trunk.

Both CVS and SVN repositories will be on same linux machine.

How could this be done?

Also conversion where CVS branchA becomes SVN trunk and all other CVS branches are ignored might be enough.

Best Solution

I am especially interested in preserving commit history. If I rename and move branches around in SVN after the conversion, will the history be preserved?

Yes. Subversion also keeps track of changes to the directory structure, and all version history is preserved even if a file is moved in the tree.

I recommend converting the repository with cvs2svn, including branches and tags. Once the repository is in Subversion you can move the branches and tags around as you wish. This also keeps the history of the actual tags and branches being renamed, which may be interesting in a historical context later.