My company currently uses two separate CVS repository for all of its projects.
My boss has chosen to migrate to SVN at one condition: migration must be gradual and must cause at least downtime as possible.
Given that I will keep the multi-repository structure (so customer software goes to repo1 and internal software to repo2, even if this distinction is not strictly necessary), I would like to ask if it's possible to periodically nominate a project for migration from CVS to SVN and migrate it to an existing repository.
Let me explain better. With an example involving only one repo for simplicity.
Normally, cvs2svn
can generate a dump file (I already made a few successful attempts) that can be imported with svnadmin load
to an empty repository. And normally cvs2svn
can be used to generate a dump for one or multiple chosen projects (there are a few tutorials about it, all run successfully).
Since I can generate anytime a dump for any chosen set of CVS project, say A, B, C, can I (and how) use those dumps to append those revisions to the SVN repository where projects, say P and Q, already exists?
Clarification: I expect the filesystem layout to look like
/svnroot
/projectA
/branches
/tags
/trunk
/projectX
/branches
/tags
/trunk
I was going to give you a slightly curt answer pointing out that what you want is documented in the cvs2svn
FAQ. But then I realized that that I edited away that part of the FAQ entry years ago (my mistake, sorry!). So I just added it back to the FAQ, for you and for posterity.
The idea is to convert each project to a dumpfile, placing its trunk, branches, and tags directories where you want them to end up:
cvs2svn --dumpfile=/tmp/projectA.dump \
--trunk=projectA/trunk \
--branches=projectA/branches \
--tags=projectA/tags \
and then load the dumpfile into the existing Subversion repository:
svnadmin load /svnroot </tmp/projectA.dump
The advantage of using a dumpfile for subsequent migrations is that the Subversion repository only needs to be taken offline for the duration of the svnadmin load
, rather than for the whole time that cvs2svn
is running.