My personal repository migrated from CVS to Subversion

This was a long time coming, but I’ve finally migrated my personal source code repository from CVS to Subversion. I had to make many passes at it with cvs2svn to get it laid out reasonably well, but it’s done.

The new subversion repository is in one of my ZFS pools (mirrored), hence I feel a little more secure about its longevity. And it’s not as if I don’t have backups. I wrote a new script to snapshot and send/receive the repository nightly using an incremental scheme. A full snapshot is sent every 4 weeks, an incremental versus the full is sent every week, and an incremental versus the weekly is sent every night. These are received in a ZFS pool on another host. I’ll likely svnadmin dump the repository monthly as well to send off-site.

Why did it take me so long to do this migration? Well, there are things I still like about CVS. One of them is $Name:$ substitution for tags, which has no equivalent in Subversion. Yes, there’s svnversion, but that’s not the same thing nor is it even close to the same thing. And when you’ve long been using this feature (my CvsTag class, for example), it’s painful to give it up. Fortunately I now have an SvnTag class in libDwm that provides at least some of the functionality I need. Namely being able to emit a tag or branch name from within a program by parsing the HeadURL substitution with a user-provided regular expression at compile time.

Another reason was simply the amount of work required. I have about 1.1 million lines of C, C++ and java code in my repository, spread across projects going back 25 years.

I won’t write about all of the upsides of using Subversion versus CVS. It’s a topic that’s been beaten to death, and if there were no upsides, I would not have migrated. Obviously, the constant-time and space remote copy mechanism (used for branches and tags) is a huge boon for frequent branches and tags of large projects. As is the ability to delete branches that are no longer active. These things alone were enough motivation for me to switch.

A friend asked me, “Why not switch to GIT?”. The simple answer is that I don’t have enough experience with it yet. I’ve used it, but I’m a novice. And my needs don’t match GITs primary features. I don’t need a full history of my projects on the machine on which I’m working, and my personal repository is for personal use. Since my Subversion repository is on my local gigabit ethernet, I don’t suffer much for speed. And since I own and administer the machine hosting the repository, I’m free to have the backup scheme I need.

Leave a Reply