Monday, April 21, 2008

Version Control

If you've ever saved multiple versions of a file over time just to keep track of your progress on a project and what you added when, Subversion might be of interest to you.

Subversion is a free and open source multi-platform program that lets you keep track of revisions in a document, easily on a single computer and with some effort from multiple computers and with multiple contributors.

The Unofficial Apple Weblog recently added a post with a link to exceptionally clear and detailed instructions by author Rachel Greenham on installation and basic use of Subversion on a Mac OS X system, with a note that it will be similar in Unix/Linux machines. (Windows users can find instructions through lifehacker.)

I downloaded the pre-built binary installer she linked to and ran it and was able to use it in less than a minute. One caveat about her instructions: code is shown as white text on black background boxes and in Firefox (on my machine at least) it doesn't wrap properly and to see all that you need to enter you may need to highlight past the right edge of the box. This wasn't a problem with Opera or Safari, though, and given the mysteries of browser rendering may be a quirk of this machine.

I didn't experiment with more than a minimal example (and that in the Mac OS X command line interface, Terminal, rather than using one of the graphical front-ends she writes about) but it was enough to demonstrate that it worked as promised and wasn't too difficult to use.

One of the particularly nice features of Subversion is its ability to be run on a server and thereby allow multiple people to work on the same document at the same time and still allow changes to be tracked, or the same person to work on a file from different computers. Setting this up seemed significantly more difficult and not something quite as useful to me, but for further details, try the links at this post to the Mac OS X TeX list, in particular the one to the entire free (!) O'Reilly book on the subject.

A final caveat which unfortunately will probably make this less tempting for many readers: Subversion works well only for files using plain text (.txt, .html, .tex, etc.). Open Office, MS Word, and other similar binary file formats are less well served, according to Greenham, and some applications that appear identical in function to the user but in practice work differently (like Pages, part of Apple's iWork application bundle), apparently won't work at all. For the file formats it supports, Google Docs might be a better choice for tracking revisions and use from multiple computers and by multiple authors.

And a note to my early audience: although it's quite likely future postings will be similarly esoteric (or, as some might see it, boring), I think few will be this technical (or again as some might see it, geeky).

1 comment:

Amber said...

That looks kind of cool, but as soon as you said "Terminal" and "command line" I got scared. :-)

By the way, you're well on your way to looking Very Smart.