Related link: http://subversion.tigris.org/

I don’t have a ton of complaints about RCS (which I started using about 14 years ago) or CVS, though I am sure others have more. My one fog-minded problem I had with CVS was configuration — just getting it to work as expected — which might have just been a documentation or operator (that’s me) problem. It’s been awhile, so I don’t remember what sources I was using, but I got frustrated and just created my own silly backup system with a script and ZIP. In the last few weeks, though, I stumbled on Subversion. I downloaded and installed it, and so far I am liking it. Actually, I am liking it a lot.

Subversion has really good documentation, which made the set up easy and sort of fun. I downloaded the Win32 version of Subversion to my Windows XP box (Jostein Anderson’s installer version). (Subversion also has builds for Redhat, Debian, SUSE, Mandrake, FreeBSD, pkgsrc, and Mac OS X.) Once installed, Subversion was available at the command prompt (there’s a UI version for Windows, too), and I was able to set up a repository and start checking things in with just a handful of commands.

Here is a cheat sheet for using Subversion on Windows on the command line (probably works on other platforms if you just change the file paths to match your platform).

Create a repository:

svnadmin create c:/repository

Get help on any command:

svn help import
svn help checkout
svn help ci

Import a directory (c:/Stories) to the repository:

svn import Stories file:///c:/repository/Stories -m "initial import"

Checkout (co) the directory (I moved the original directory out of the way first, just to keep things straight in my own mind):

svn checkout file:///c:/repository/Stories Stories

The Stories has a file called genx.html. Edit. Edit. Edit. Commit (ci):

svn ci genx.html -m "Incremental backup"

Look at the log in XML:

svn log genx.html --xml

Result:

<?xml version="1.0" encoding="utf-8"?>
<log>
<logentry
   revision="6">
<author>mike</author>
<date>2004-05-10T23:24:56.959208Z</date>
<msg>Incremental backup</msg>
</logentry>
<logentry
   revision="5">
<author>mike</author>
<date>2004-05-10T21:49:15.263054Z</date>
<msg>Incremental changes</msg>
</logentry>
<logentry
   revision="4">
<author>mike</author>
<date>2004-05-10T21:36:39.796747Z</date>
<msg>Incremental changes</msg>
</logentry>
<logentry
   revision="3">
<author>mike</author>
<date>2004-05-07T21:20:05.425290Z</date>
<msg>Added to set up section</msg>
</logentry>
<logentry
   revision="1">
<author>mike</author>
<date>2004-05-07T19:27:47.276308Z</date>
<msg>Initial import</msg>
</logentry>
</log>

If you are not entirely tickled with CVS, try Subversion. It’s clean, it runs on lots of platforms, it’s nicely documented, and it’s a pleasure to use. There is promise of cool new features (such as HTTP WebDAV/DeltaV repositories on Apache servers), and from what I’ve seen, I think the Subversion folks will deliver.

Will you try Subversion, or is it too much of a hassle to move away from CVS?