I've been moving all my stuff from CVS to Subversion over the past
few months. Some of the stuff (like server config files) I've
just been moving the top revision across since the history is of little
concern. The larger projects, however, I've migrated the whole
history with the fantastic cvs2svn
tool. It somehow reads your CVS directory, figures out what each
changeset should be (presumably by finding nearly identical timestamps
with the same commit message), and then imports it all into Subversion
just as if you'd made the same commits as you did to CVS.
Needless to say, this is fantastic, since it basically lets you switch
from CVS to Subversion with almost no cost. But how well does it
work?
Tonight, after a couple months of wussing out, I finally
sacked it up and moved my company's main app across and it went
flawlessly. It's not a huge app by any stretch (2500 files or
so), but it had several years of history with a lot of branches and
tags in there. Much to my relieve, it all came across perfectly.
I
ran into two minor problems with the export, undoubtedly due to newbie
screwups I made, since both were from very early in the history.
First, I had a tag that was both a tag and a branch; easily solved with
the –force-branch="branch_name" option to cvs2svn. Second, I had
an invalid keyword expansion command, and that was solved by using the
–use-cvs option so it used CVS rather than RCS's checkout command.
After
those tweaks, and about two hours of spinning, I had a shiny new
Subversion repository. Disconnected the projects in Eclipse,
moved my CVS working directories out of the way, checked the same
branches out from Subversion, copied my .project file (for Eclipse)
over, and reconnected the projects in Eclipse (to Subversion this
time), and off I went.
If you're considering moving from CVS to
Subversion, but haven't because you don't want to lose all that
history, definitely check out this tool.
I had some major problems converting a series of CVSNT repositories over, specifically files not always converting properly, and it was difficult to track down to specific scenarios. In the end I got most of them converted but just gave up on the remaining project that wouldn't convert and started from scratch with SVN.