I’ve been learning Mercurial over the past two weeks and I’m really loving it. I’ve used git before, and had a bunch of issues with merges (my fault, not git’s - but troublesome none the less). I thought I’d have a good look at Mercurial to see what it offered.

I’ve got to say the learning curve with Mercurial has been awesome. I bought a copy of the book, which has helped with the headshift of working with distributed revision control. A side benefit is that I now understand git better as well :-).

One of my real interests in exploring Mercurial is the standard of tooling. I’ve been happy with TortoiseHg on Windows, and am comfortable with the commandline on OSX, but I was keen to see how the IDEs fare. These days I’m using Netbeans for Grails development, and the Mercurial support is just fantastic (and built in the basic install!).

First up, let’s have a look at the basic editor window.

The Netbeans Mercurial Editor window

Just like the normal Netbeans subversion support, the project explorer on the left marks modified files in blue, and new files in green. Any folder paths containing new/modified files have a small cylinder to let you know. All good visual cues. You can also see the Versions window active in the bottom right. This gives you a full list of your new/modified files for this project. You can right click to find out the deets.

The editor window itself contains markers for lines you’ve modified, which avoids a lot of the need to fire up a diff. When you’re ready to commit, you get a standard dialog:

The Netbeans Mercurial Commit window

With our commits all in place, all the colour scheme on our files revert to default black. But what if you need to do a more serious look at a file’s history? No problem, just the normal right click, / Mercurial / Show History, and you’ll have all the info you need. This dialog gives you the local repo revision number against each change, so it’s easy to get back to where you were later:

The Netbeans Mercurial History window

So what’s missing in the Netbeans Hg support? There’s a few things I haven’t found yet. There doesn’t seem to be any visual history for the project, (as per “hg glog” or “hg serve”) - and there doesn’t even seem to be any support for branching and cloning. But for day-to-day stuff, I’m happy to revert to the commandline for those for now.

So overall I’ve been super happy with Mercurial so far. I just yesterday saw Ted Nalied‘s great presentation on Mercurial - which is also a good resource for seeing what Hg has to offer.

Also look forward to checking out Mercurial Eclipse once I finally get Eclipse Spring/STS installed.

If people are interested, I’ll put together a basic Mercurial/Grails screencast to get you started (ala Jeff Brown’s awesome Grails/Git one).