Archive for April, 2006

Why I Like Darcs

Sunday, April 30th, 2006

I came into revision control from a rather unusual path these days: RCS. We use RCS at work to manage FrameMaker and DocBook content with hard locking, and it still works remarkably well. At the early days of AudioBeta, now GiraffeGiraffe, we were using CVS for code, but the codebase was pretty small and I convinced Daniel and Altay to try out darcs (skipping SVN altogether). We’ve been using it since November or December now.

In the intervening months, I’ve been extremely happy with darcs, especially the:

  • ease of setup (darcs intialze && darcs add *)
  • ability to commit patches without being on the internet
  • stability (I only broke it once, and I think it was my fault)
  • portability (works on our Unix, Linux, Mac, and Windows boxen)

Here’s what I don’t like about Subversion (perhaps because I don’t know enough), especially since I’m more used to darcs:

  • Way too hard to start a repo, I don’t think I can even do it at work without being a sudoer. I want to be able to put even the smallest stuff into revision control trivially.
  • I want to be able to commit patches internally without forcing them down others throats. Because darcs is decentralized by design, I can commit patches (darcs record) without sending them to anyone else. When I’m ready to share, I can submit a whole bundle of patches to our de-facto central repository for sharing with others (darcs push [another repository])
  • Why can’t I review the commits and decide whether I want them? darcs allows me to view a diff while I’m pulling patches (essentially svn up and then accept or decline patches as I see fit.

This last point, the one on reviewing patches, has allowed me to do impromptu code reviews on everyone’s patches (when I pull them), which has helped me learn the rest of the application much better than any other method (more on this later, someday).

Just to be complete, darcs bummers:

  • Really slow and inefficient at moving patches over SSH
  • Takes a long time to commit big files (don’t use darcs if you’re writing in a really verbose language or can’t otherwise break up your code into nice chunks)

More on darcs here: http://abridgegame.org/darcs/