George V. Reilly

Distributed Version Control Systems on Windows

Distributed/Decentralized Version Control Systems

At work, I’ve been ex­per­i­ment­ing with the big three Dis­trib­uted Version Control Systems, Git, Mercurial, and Bazaar, on Windows over the last ten days.

Pavel and Eric have been singing the praises of Git and git-svn on their Mac and Linux boxes re­spec­tive­ly for the last few months. Git allows them to check in small changes locally without perturbing the build. The ease of branching and merging allows them to work in more than one branch at a time at a lower cost than Subversion did. Most of our dev team continue to work in Subversion on Windows boxes. git-svn allows Pavel and Eric to easily in­ter­op­er­ate with the Subversion server. Pavel is also a big fan of git-stash: he stacks away in-progress work and switches easily to other patches.

Although I’ve worked primarily in Python on Linux since the summer, I’ve been working on our forth­com­ing mobile client recently. It’s ASP.NET-based, hence I’m working on Windows again. I’m in the throes of a major refac­tor­ing, extracting the mobile client out of the main webclient and hoisting other code into shared projects, while other developers continue to work on the main webclient and the mobile client.

This seemed like a perfect op­por­tu­ni­ty to bite the DVCS bullet, since I knew that branching and merging would be less painful with git-svn than with Subversion.

Getting git-svn working on Windows turned out to be a major headache. The Cygwin version of git-svn simply doesn’t work for me. And msysGit doesn’t currently support git-svn. (Eric has had some success with an older version of msysGit and git-svn, but I found it to be wretchedly slow.) Moreover, Git’s in­te­gra­tion with Windows is poor. There’s nothing like Tor­tois­eSVN to ease developers into using Git.

Having written off Git on Windows for now, it was time to try Bazaar (bzr), which has its own Subversion plugin, bzr-svn. The version of bzr-svn that was available for Windows the week before last was ancient, and promptly crashed. Jelmer, the developer, mailed me yesterday to say that there should be an up-to-date copy of bzr-svn in the brand new 1.9 release of Bazaar. I’ll try it at work tomorrow. Windows doesn’t seem like an af­ter­thought for Bazaar; indeed, Tor­toise­Bzr offers Explorer in­te­gra­tion.

On to Mercurial (hg). Alas, this has the weakest in­te­gra­tion with Subversion. There are in­struc­tions for doing it by hand (which is what I’m doing). The hg­sub­ver­sion extension looks promising, but is still immature.

Even so, Mercurial is what I’ve ended up using for the last week. Partly because it didn’t bite me. Partly because I like it best of the three. The Mercurial book takes much of the credit for that. Windows is a first-class client and TortoiseHg offers half-way decent Explorer in­te­gra­tion.

I’m not impressed with Git as software en­gi­neer­ing; it strikes me as an incoherent mess of C and Perl. The attitude of su­pe­ri­or­i­ty from some Git proponents is off-putting. I watched Linus Torvalds’ Google techtalk about Git on Friday; he came across as a major jerk, repeatedly calling anyone who uses Subversion an idiot. I’d still recommend watching the video: it gives good insight into the social aspects of dis­trib­uted/de­cen­tral­ized VCSes, how very different they are from tra­di­tion­al cen­tral­ized VCSes, and how they afford a different way of working.

Watching my compatriot Bryan O’Sullivan’s Google techtalk on Mercurial this afternoon was a far more pleasant experience. He talks more about workflow and im­ple­men­ta­tion.

Both Bazaar and Mercurial are written in Python and seem to be fairly well ar­chi­tect­ed. Frankly, if I do have to get my hands dirty in the code (e.g., hg­sub­ver­sion), I’d much rather hack in Python. I did C/C++ for fifteen years and I’m sick of unmanaged code.

Anyway, Mercurial is where I’m going for now, though I won’t cat­e­gor­i­cal­ly rule out Bazaar or Git.

blog comments powered by Disqus
Bereft after the Obama win » « Freely Speaking Toastmasters' 20th Anniversary