Mercurial versus git for sysadmins, or why we picked Mercurial

December 13, 2009

I've recently managed to persuade my co-workers to start migrate away from doing version control with RCS and to using a modern VCS (which has made me think about various issues). Specifically, I picked Mercurial, which I think is one of only two sensible options right now (the other being git).

I'm perfectly prepared to believe that git has important aspects that make it technically superior, and that git has more power for doing sophisticated things that matter for serious development. But for us, all of that pales next to a very important property of Mercurial: it's really easy to tell my co-workers how to use Mercurial. Without caveats and 'watch out for this mistake' and 'never forget this argument or odd things happen'.

We have simple needs; point in time snapshots, the ability to see what we changed, and perhaps to write log messages about it that will be preserved for later use. I can teach people how to do this in Mercurial in a few simple commands. Git is, how can I say this nicely, not quite as simple, and it looks much more intimidating. (Such perceptions count a lot when you are trying to sell a new way of doing things to nervous co-workers.)

And, since we have such small and simple needs, any technical advantages and sophisticated features are essentially irrelevant. Git may be better than Mercurial, but either of them are good enough for our modest needs. So Mercurial's simplicity of use wins the day.

(I have found myself tilting this way for personal use as well. Git may be a great system, but it's still intimidating. Mercurial is much less scary. I somewhat regret this, because I really do want to someday use git for more than tracking the Linux kernel, so that I can get properly familiar with it. (Of course the answer to this issue is to just force myself to use git for my next project.))


Comments on this page:

From 78.35.25.22 at 2009-12-13 15:56:48:

This sounds like FUD to me. Do you have any examples of “never forget this argument or odd things happen” other than commit -a? Even in that case, I would argue that it is a mere matter of explaining the index. And yes, the index seems weird at first, but at this point I wouldn’t want to use a VCS that lacks it.

By all I can tell, while git used to be more difficult to use than Mercurial, it has long since become no harder even in daily use, and that reputation merely hangs on as a relic of the past.

Aristotle Pagaltzis

By cks at 2009-12-14 00:59:46:

It's possible that I'm falling for the reputation instead of the current reality, apart from the index. I haven't dug into git very much, partly because of that reputation.

As for the index: I totally see the appeal for developers; I've certainly had lots of cases in my own programming where I was happy about part of my changes but still working on others, and so I would have liked to be able to check in just the good bits. But I'm specifically picking a VCS for sysadmin stuff, and there I don't think we cherry-pick or even want to cherry-pick changes, and so an index is either unnecessary or a drawback (because it lets you make new and novel mistakes, plus it adds complexity in explaining and using the system).

(In part this is a marketing and sales issue. I could explain the index to my co-workers, but I don't think they'd have a good reaction to it; from their perspective it just adds complexity that they have to deal with.)

From 128.240.229.7 at 2009-12-15 10:51:13:

I've never used mercurial so I cannot compare the two, but git would be a hard sell at my institution for the same reasons. I use git a lot myself. I found it to have a steep learning curve, about 12 months ago, at least. Perhaps it has improved. The trouble is, anyone who has been through that learning curve is not in a good position to judge whether it has improved or not. Have you seen bazaar? I haven't tried it much myself, but if I was trying to sell a DVCS at work, I think I would begin evaluating bazaar. I'd be interested to hear of its merits for this purpose vs. mercurial. -- Jon

By cks at 2009-12-24 14:06:46:

Department of belated replies:

I haven't looked at bazaar, mostly because my impression is that there are only two DVCSes worth seriously considering right now, those being Mercurial and git. I admit that part of my view of bazaar is soured by it being related to arch, which has what could politely be called a 'contentious' history.

(In looking at the Wikipedia comparison page, I see that this is probably unfair by now, and bazaar has at least one interesting feature for me, namely that it preserves file timestamps. I should probably look at it sometime, but seriously evaluating a (D)VCS is a bunch of work.)

Written on 13 December 2009.
« You should always be able to get a program's version and basic usage
Sysadmin versus developer uses of version control systems »

Page tools: View Source, View Normal, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Sun Dec 13 00:58:18 2009
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.