views:

23

answers:

2

I have a rather large CVS repository that I am looking to only convert a handful of modules into a single Subversion repository. I have been correctly guided to using cvs2svn for the conversion and have even gotten as far as building my own options file. I do not need to retain tags or branches, but I would like to retain the revision history. My issue is that I want my modules to be under a single trunk folder, e.g. svn/trunk/module1 and svn/trunk/module2 instead of svn/module1/trunk and svn/module2/trunk. When I set the path to nothing it throws an error about the path being blank. Any suggestions?

+2  A: 

My issue is that I want my modules to be under a single trunk folder, e.g. svn/trunk/module1 and svn/trunk/module2 instead of svn/module1/trunk and svn/module2/trunk. [...] Any suggestions?

Why don't you import the structure the way it is and move things around later in the repository? The ability to move things around is one of the greatest advantages of SVN over CVS, after all. (The fact that this change of structure is then in the history can actually be seen as an advantage.)

sbi
+1 for preserving the structure on import and restructuring with history in svn.
zellus
You know, I didn't even think of this, mind lapse.
John Bellone
A: 

The easiest thing to do is to make a copy of your CVS repository, then (in the copy) move the directories around the way you want them to end up in the resulting Subversion repository. Then convert as a single project, pointing cvs2svn at the appropriate directory within the rearranged repository. E.g.:

mkdir $CVSCOPY/proj
mv $CVSCOPY/path/to/module1 $CVSCOPY/proj/module1
mv $CVSCOPY/another/path/to/module2 $CVSCOPY/proj/module2
cvs2svn [OPTIONS] $CVSCOPY/proj

(If your submodules are already arranged in the desired way, the copying and rearranging might not even be necessary.)

mhagger