December 2007 Archives
After a bit of playing around with three different distributed version control systems, Git, Mercurial, and Bazaar, I’ve decided on Mercurial. For choices like this, especially when none have glaringly obvious problems, it can be difficult to make an objective decision. Sometimes it’s best to just go with your gut, and my gut was telling me Mercurial.
I plan on using Mercurial for new projects and converting a couple older Subversion repositories. For some projects where I still have to use Subversion, I will be using git-svn, though. This allows me to test drive Git a bit more, too.
Also, once I realized it was pretty easy to convert from one system to another, it made the choice a lot less permanent. If I decide to try Git or Bazaar in six months, I don’t think it’ll be much of an issue to convert the Mercurial repository.
There was a bit more detail to my choice, but it’s better to explain why I didn’t pick the other options. Read on for details.
Version control systems. If you’re a software developer, you’re (hopefully) using one. The most popular version control system (VCS) is no doubt Subversion. It’s what I currently use on every one of my projects, both personal and business. While Subversion is a great improvement over previous VCSs I’ve used (CVS, RCS, SCCS, ClearCase and home grown), it’s not without its warts. And unless you’ve been living under a rock, it’s starting to get some serious competition. I’ve decided to play the field and see what this competition has to offer.
The Rise of Distributed Version Control Systems
Within the last year, distributed version control systems (DVCSs) have really started to break into mainstream development. DVCSs are a different way of thinking about version control. They break the mold of a single, central repository that most VCSs have, like Subversion and CVS. A distributed VCS is different. Each user checks out their own full copy of the repository and commit locally to it. These changes may then be shared with others, often by syncing to a canonical repository.
I’m not going to talk much about how DVCSs work or the benefits of a distributed VCS versus a central VCS. That has already been much discussed elsewhere. I highly recommend watching Linus Torvalds’ YouTube video on Git and reading Wincent Colaiuta’s piece called Why Distributed Version Control.
The Options
My own personal desire came when I was without Internet access for a few days (shocking, I know), and realized that offline commits would be really useful. Also, I’ve many times thought it would be nice to be able to do local commits during a large feature. DVCSs solve both of these issues cleanly and elegantly. Commit to your local repository, and push out the changes when you have an Internet connection or when you’re confident the feature is stable enough.
So now that I’d bought into DVCS hype, I decided it was time to kick the tires and try them out. As a new user, I’ve found that choosing a DVCS is a bit overwhelming. The number of DVCSs to choose from is staggering: Git, Mercurial, Bazaar, darcs, Monotone, Codeville, arch. The big three I decided to look at are Git, Mercurial, and Bazaar. After spending a day look these, I’m still not fully decided, but here are my thoughts so far.
I broke my foot. And while I’d like to blame it on my cat, I can’t, in good faith, do that. He was involved just a little bit, though… Our cat is a playful cat, and he likes to be chased. One of our play routines is where I chase after him, running pretty much at full speed down the length of our condo. Then we turn around, and he chases me back. We do this, back and forth, for a good ten minutes or so. It’s fun for the cat and me, and it wears him out before we go to bed.
Every time I do this, I keep thinking, “One of these days I’m going to kill myself.” Running full speed in our condo is just downright dangerous. I always thought I’d slip on the hardwood floors and break my leg or crack my head open or something. Well, it finally came true. I didn’t fall and crack my head open, but I did break my foot. We had one of those big backpacking backpacks (which is full of hard plastic) laying around, and I slammed my foot into it. The result, a fracture of the fifth metatarsal on my left foot:
[ Editorial note from the cat: Seriously, I thought I was a goner as Dave came crashing down towards me. Thankfully, I’m fine. And Dave’s new boot amuses me. ]

