Version control ramble

This is sort of embarrassing. I have a Ph.D. in engineering, I’ve been using computers since the punchcard days, and I’ve programmed in at least a dozen languages, but I can’t figure out how to get started in version control.

First, I’m paralyzed by the number of VC systems out there and the way the field is changing so rapidly. When I first thought I should start using VC for some programming and writing projects, CVS was the system. That was soon overtaken by Subversion. Now distributed VC seems to be the wave of the future, but which one to choose? Git has most of the buzz, but some swear by Mercurial. Does that even matter for me? I’m the only user/writer of the files I want to put under VC.

Second, the instructions I’ve read never seem to be written for me. As I said, I’m not part of a developer group, and I don’t need a hosted repository. It’s just me and my computer--OK, two computers--with no other users and only a handful of files per project. Maybe it’s not the instructions that aren’t written for me, but the VC systems themselves, because…

Third, there seems to be an awful lot of bullshit getting in the way of what should be simple. Do I really need to set up a Subversion repository for every report I want under version control? Why can’t the repository be made automatically within the report folder?

Here’s what got me spoiled: Several years ago, I put my .emacs file under version control, because mistakes could really screw up my Emacs environment, and I wanted to be able to roll back to a good configuration. I used RCS because Emacs had a simple interface for it, and it seemed to work quite well. The .emacs file that sat in my home directory seemed to act as both a repository and a working copy, with the change history necessary for rollbacks kept in a separate file. I know that repository/working copy duality was something of an illusion created by Emacs’ RCS support, and not part of RCS itself, but it sure was easy to use. I want that same ease of use without Emacs, and I want it with binary files as well as text files.

RCS comes with OS X, and I’ve considered using it despite its age. Its commands are simple, and I think I understand it pretty well. Writing a basic RCS bundle for TextMate should be pretty easy, and I could add more complicated functions as I need them. Binary files, like graphics, would be more difficult to manage, but I bet some clever combination of AppleScript and shell scripting would allow me to check in graphics files through a menu or keystroke command.

But before I go off in the RCS weeds, I’m going to give Cornerstone a try. If it sets up repositories on the fly and handles checkin and checkout as well as Emacs--but for binary as well as text files--I may buy it. But I am concerned about something John Gruber said in a recent post:

It strikes me as an odd coincidence that two serious Subversion clients [Cornerstone and Versions] would debut at a time when many developers are starting to switch away from Subversion to distributed revision control systems such as Git and Mercurial.

If I buy Cornerstone, and Zennaware abandons Cornerstone because Subversion is a dead end, I’ll be left with an orphaned application that will undoubtedly fail under some future version of OS X. Command-line programs are much more futureproof.

The final paragraph of and essay is supposed to summarize what’s gone before, but as I scroll back up through this post, it seems too unfocused to be summarized. I guess that is the summary--my current view of version control is unfocused. After years of squinting, I want to change that.

Tags: