logo

Netbeans {hearts} Mercurial — With Screenshots

logo

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).

6 Responses to “Netbeans {hearts} Mercurial — With Screenshots”

  1. Ed Tennant says:

    I actually looked at Mecurial before Git because of the tool support in NetBeans. I am curious to hear how the Project Kenai integration works, have you given it a try? I was hesitant to start something at Kenai that wasn’t a real project but I recently read they now have the feature to delete a project so it might not be as intimidating as before. I would be interested in the screencast you mention.

  2. Ted Naleid says:

    I’m glad you liked the presentation Glen, thanks!

    Nice review of the NetBeans mercurial integration. I tend to be a command-line guy, but I’ve also used Murky on OSX as a stand-alone IDE. Some of my co-workers that use Windows really like TortiseHg (similar to TortiseSVN).

    It’s good to see some others in the grails community getting into Mercurial. I’ve been using it for a couple of years now and find it much easier to use than git. The features of git and mercurial have converged, so that it’s now more of a culture and usability difference rather than abilities of one system over another.

    For people looking for mercurial hosts, I can recommend bitbucket. I use it for personal accounts (including my grails plugins), and we also have private repos hosted with them at my workplace.

  3. Nice post Glen.

    Mercurial in NetBeans is better integrated than MercurialEclipse and Eclipse.
    I’ve been using ME more lately since the support of grails and groovy in Eclipse has leaped well ahead of Netbeans(IMO).

  4. sombriks says:

    i have problems to pull/push mercurial things on netbeans. those menu options don’t appear to me.

    any idea why?

    i’m using 6.8 Beta

  5. Petr Dvorak says:

    Ed: It’s definitely worth giving Kenai a try! :) Please share your thoughts/observations afterward!

  6. Glen Smith says:

    @sombriks – I was using Netbeans 6.7.1. Worked fine out of the box. Maybe try the latest RC?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

logo
logo
Powered by WordPress | Designed by Elegant Themes