Mercurial support in NetBeans - not just wishful thinking :)

Well around the start of March my boss cornered Padraig and myself to asked the age old question, "Are you busy?". Having just got the DTrace Framework for Mozilla out the door, we foolishly replied, "Nope" and then the fun really began!

Mercurial commit (early days) Mercurial Diff

Crazy Requests 

He said folks wanted to get Mercurial support into the NetBeans IDE, which as it's a really cool, lightweight and scaleable distributed source code control system, seemed eminently reasonable. But why was he asking two OpenSolaris happy hackers to work on a Java based IDE platform and a distributed source code control system we barely knew how to spell. Well needs must as they say and with OpenSolaris (Onnv) and OpenJDK having moved to Mercurial and NetBeans thinking about it, I could see there was something of an urgency.

So myself and Padraig O'Briain, where Shanghai'ed as they say. Oh and by the way we need it by JavaOne of course :(

Maros to the Rescue 

Thankfully NetBeans had already put in a new VCS framework in 6.0 and Maros Sandor, one of the key Subversion developers, kindly put together a skeleton VCS for us to use as a basis for our work. Without this and all the NetBeans folks ongoing support we would have truely been dead.

It lives, it breathes!!

So enough of my ramblings suffice it to say we started scratching our heads a few weeks into March, once the fog of St Patricks day had passed and here at the start of May our baby is born so to speak :) It's up on the NetBeans 6.0 m9 Preview developer update center for all to enjoy. All the gory details are up on the Mercurial Plugin wiki.

Mercurial Plugin 

To use it just get NetBeans 6.0 m9, and go to Tools/Plugins -> New Plugins, select Mercurial under Versioning and click on Install. We've a demo script you can walk through to get an idea of how to use it. Just create a new Java project, right click on it and select Mercurial->Initialize Repository to get things started. Flash demos to follow once I figure out how to do them ;)

This first cut focuses on local repository support, but integrates well with all the new VCS features in 6.0, including editable diff / inline diff, versioning view, status and annotations. We plan to add additional features for selective update/revision reverts, merge support and remote repository support incrementally over the next few months and push them out on the dev update center.

Our plans are up on the Mercurial Plugin wiki. Feel free to send gripes, wishes and general comments to  nb-mercrial@sun.com. Check us out at the NetBeans Day at JavaOne if you are about, in the pod demos.

Have fun, I know we did!! Opps wasn't meant to say that, "We toiled endlessly over hot keyboards, long into the night .....", hope the boss doesn't read the blog ;) 

Comments:

Congrats!

Posted by Geertjan on May 06, 2007 at 10:22 AM IST #

Are you sure it's working ? I have an empty subnmenu under mercurial.

Posted by Vincent Brabant on May 06, 2007 at 02:56 PM IST #

Vincent - it needs Mercurial 0.9.3 installed and NetBeans 6.0 m9 preview to work. If it doesn't find Mercurial, you will get an empty Mercurial menu. We need to get additional support from the platform to stop the top level menu appearing at all. Next rev. If you have 0.9.3 installed can you log a bug with all your platform details on Issuzilla with mercurial as the component. Thanks.

Posted by John Rice on May 06, 2007 at 05:54 PM IST #

Note: This release will only work with Mercurial 0.9.3. The code runs a "hg version" command looking for the "0.9.3" string. In future revs we will make this less restrictive, allowing users to continue if the version check fails http://qa.netbeans.org/issues/show_bug.cgi?id=103144

Posted by John Rice on May 06, 2007 at 06:29 PM IST #

Is Maros' skeleton VCS available anywhere? It might tempt me to try and create a similar module for Clearcase...

Posted by Andy Stevens on May 08, 2007 at 10:01 AM IST #

Andy the good news is that Maros has already created a Clearcase skeleton for you under the NetBeans cvs. I've added a few general notes under, http://blogs.sun.com/jmr/entry/using_maros_s_vcs_skeleton. Make sure to check out Maros' VCS API overview as well: http://jupiter.czech.sun.com/wiki/view/Lct/VcsAPIdesc

Posted by John Rice on May 08, 2007 at 10:03 PM IST #

Post a Comment:
Comments are closed for this entry.
About

jmr

Search

Top Tags
Categories
Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today