elehack.net

DVCS selection woes

I’ve been a convert to distributed version control, and in particular a user of Mercurial, for a few years now. I love Mercurial — its user interface is simple, the core concepts make sense, and it generally does an intelligent job of managing my programs (or config files, or homework assignments, or whatever).

I’ve tried to learn Git a few times, and even started converting to it some time last year, but go back to Mercurial for its user-facing simplicity. Internally, Git is simpler, but mapping use cases on to that simplicity is entirely exposed to the user. Mercurial’s UI is much more task-driven, such that there’s really one obvious way to do most useful things. I usually am able to keep my Mercurial repositories in somewhat sane states; Git’s failure mode seems to be leaving your branch refs in an incomprehensible state.

So far, Mercurial is a clear winner. Except Git has ecosystem. DVC is great, but Magit is awesome. Bitbucket is pretty good, but Github has a much more polished UI (especially in its bugtracker). I’ve been working lately on an open-source project hosted on Github, and the experience has been spectacular (modulo a small piece of unexpected behavior with pull requests).

I’m still held back on Git, though, because it’s so easy to get things wrong. I can get around it in for basic stuff, but I totally don’t understand the magic for mapping between local branches and remote branches, and controlling where pushes and pulls happen with multiple remotes. I’ve read manuals, and it’s still a blur. Mercurial just makes sense. It isn’t quite as flexible in its branching behavior, but that lack of “flexibility” pays off in having fewer ways to break your configuration. And on the ecosystem front, Mercurial does still have a win - HGEclipse (the Mercurial team provider for Eclipse) is, in my opinion, notably superior to EGit (the Git equivalent).

So I’m stuck with what to do. I may, however, have found a solution: today, hg-git crossed my radar. This Mercurial extension allows Mercurial to clone, pull from, and push to Git repositories. With the Bookmarks extension, the Git remote branches are carried around as well. I’ve used it to clone Batteries Included, and been very pleased with the fetch behavior. I haven’t tried to do any pushing yet, but likely will before too long. If it allows me to seamlessly use GitHub for hosting while doing local development with Mercurial, it may well be a major win.

Comments

Post a Comment

You may post a comment using the form below. All fields are optional. By submitting a comment, you release it to Michael and Jennifer Ekstrand under the Creative Commons Attribution 3.0 license. See our copyright notice for details. You might also want to read our privacy statement.