cvs2svn: Convert and Place Repository into a Sub-directory of Exisiting SVN Rrepository

StackOverflow https://stackoverflow.com/questions/13904141

  •  09-12-2021
  •  | 
  •  

Question

I have an existing SVN repository on a Linux machine as /conf /db /hooks /locks format readme.txt which looks the following after checking out.

MainRepo
 -trunk
 -branches
 -tags

I want to do a few CVS to SVN conversions using cvs2svn and retain history and place the new repositories (ProjectA, ProjectB etc) under MainRepo as...

| MainRepo
     -trunk
     -branches
     -tags
   | SubRepo
      | ProjectA
         -trunk
         -branches
         -tags
      | ProjectB

How can I do this ? I have already created the sub-folders /SubRepo/ProjectA using svn mkdir .

How to place the converted repo under them ?

Was it helpful?

Solution

Have you tried setting "trunk_path" (under "run_options.add_project") in the config file?

OTHER TIPS

The reason that using trunk_path doesn't work for ProjectB (i.e., trunk_path=SubRepo/ProjectB/trunk) is that it causes cvs2svn to attempt to create the SubRepo and SubRepo/ProjectA paths. But the SubRepo path already exists from your import of ProjectA, and this causes svnadmin load to fail.

The simplest way to import the rest of your projects would be to convert each project as if it were going to be a top-level project (with top-level /trunk, /branches, and /tags directories), but write the output to a dumpfile (using cvs2svn's --dumpfile option). Then load the dumpfile into your existing repository using a command like

svnadmin load --parent-dir SubRepo/ProjectB <DUMPFILE
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top