MercurialVersionControlReleaseNotes for NB 6 1

Mercurial NetBeans Plugin Module Release Notes


Release Notes for Plugin integrated into NetBeans 6.1

Supported Mercurial Version

The recommended release is the Official Mercurial 1.0 release, if available for your OS: Binary Packages and Official 1.0 Windows and Mac Releases

  • On Windows the version string returned by the Mercurial 1.0 release is 1e4ddc9ac9f7+20080325, not 1.0. As a result, you will be prompted if you want to use this non supported version. It is supported and its fine to use it, this is a Mercurial Windows release packaging issue.

This release will work with Mercurial 1.0 and 0.9.5 on all OS's and on some other OS's with 0.9.5 and 0.9.3.

  • OpenSolaris: will work with 0.9.3 and above. Package available at for 0.9.5.


Merge Support in Windows

  • Use the existing Merge support in the IDE.
  • After a Pull or Push that has merge conflicts, the conflict files are highlighted in red and you can use Mercurial->Resolve Conflicts to use the IDE's internal 2 Way Resolver to resolve these conflicts.
  • If you do a Fetch the merge is done automatically even if there are conflicts and the changes committed. You will then need to resolve any committed conflicts manually.
  • Or Install an external merge tool such as KDiff3. This will be launched if there is a merge required during Pull/ Push or Fetch.
  • Adding KDiff3 support:
  • Download and install kdiff3
  • It may be necessary to modify <MercurialInstallDir>\Mercurial.ini as follows, though I did not have to when using the latest Mercurial 1.0 release:
interactive = kdiff3
noninteractive = diff3

For background information on Merge in Mercurial.

Merge Support in MacOSX

Mercurial official 1.0

  • With Mercurial 1.0 on Mac OSX 10.5, merge works without any changes. It uses the preinstalled Python 2.5 shipping with Mac OSX 10.5 and mercurial itself is picked up from /usr/local/bin without the need to make any PATH changes.

Mercurial official 0.9.5

  • This release for the Mac ships with hgmerge, it is installed into /usr/local/bin and this is not on the default PATH for MacOSX 10.4.
  • To get NetBeans to pick up hgmerge you need to create a environment.plist file under ~/.MacOSX.
  • The simplest way to do this is to open up a terminal, type env to dump out your environment settings to get the current PATH settings and use PropertyListEditor to create a new PATH entry adding the current PATH with /usr/local/bin appended. Create the ~/.MscOSX directory and save your new property file to ~/.MacOSX/environment.plist. You must log out and back in again for these changes to take effect.

Note: that the MacPorts and Fink Mercurial releases put things in their own install locations, so if you are using them on the Mac you'll need to update the path appropriately.

  • /opt/local/bin/ (Macports)
  • /sw/bin (fink)

Note: hgmerge on the Mac launches the FileMerge utility to carry out the Merge. Once you do the merge you need to save the changes and Quit FileMerge for the changes to take effect.

Example environment.plist:

$ cat ~/.MacOSX/environment.plist         
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "">
<plist version="1.0">


View support with the plug-in is provided by separate tool, Hgk, which is a powerful repository viewer, displaying the changesets of a Mercurial repository in a graphical form.

  • Supported on OpenSolaris and Windows platforms. Hgk is not available on the Mac.
  • To work View requires an entry to be added to your ~/.hgrc under extensions. On first invocation of View the presence of Hgk and the extension entry will be checked and if Hgk is on the system you will be prompted to have the extension entry added.
  • On Windows, you need do a few things to get hgk working:
  • ActiveTCL 8.5.2 - hgk is a Tcl script, download and install Tcl
  • hgk script - hgk is not part of the Official Windows Mercurial release, get this script and save it as hgk.tcl in your <Mercurial install dir>.
  • Edit <Mercurial Install Dir>\Mercurial.ini, so hg view can find the hgk script:

path=<Mercurial Install Dir>\hgk.tcl
  • From the IDE select a Mercurial controlled project and choose Versioning->Show->View... to launch hgk and see the graph of the repository displayed.
  • View (Hgk) Screenshot


TortoiseHg is a new Windows shell extension that lets users of Mercurial work directly from MS-Windows Explorer.

  • Check out the TortoiseHg website for latest releases.

Clone Other, Push/Pull Other Network Protocols

  • HTTP - is supported with optional username and password, though as your password is sent in plain text over an unsecured connection this is not recommended.
  • http://[[User[:password | user[:password]]@]host[[:port | :port]]/[Path]
  • HTTPS - is supported with optional username and password, you can enter
    https://user:password@host[[:port | :port]]/[Path]
    and it will be accepted. As this is going over a SSL connection your password is secure, even though it is included in the URI.
  • SSH - is supported and provides a secure connection to a Mercurial repository. You need to make sure to have already established a secure connection to the server you are trying to contact before doing a Clone Other or Push/Pull Other. This will ensure the server host key has been already cached on the client and the server has already verified your public key when you logged in/out. This can be done by just connecting to the SSH server using the command line or some SSH utility beforehand. On Windows PuTTY provides a suitable SSH agent #122133

Import and Rejects

When importing a patch Mercurial will attempt to merge the changes automatically. If it cannot you will be left with three files for each file that had patch failures:

  • <file>
  • The <file> being patched, modified with any hunks that did apply.
  • <file>.orig
  • The unmodified original file, saved as <file>.orig
  • <file>.rej
  • The rejected hunks saved as <file>.rej

Unfortunately, there aren’t any great techniques for dealing with rejected hunks ( Distributed revision control with Mercurial (12.6.5)). Most often, you’ll need to view the <file>.rej file and edit the modified <file>, applying the rejected hunks by hand.

There is an experimental tool that might help called mpatch. This is not installed with Mercurial. You need to install it by grabbing the tarball, unpack and run Run it on the command line against the <file> being patched, if you want to try and do a more aggressive merge after the first patch failure (it will automatically pick up the <file>.rej).

The mpatch command helps with four common reasons that a hunk may be rejected:

  • The context in the middle of a hunk has changed.
  • A hunk is missing some context at the beginning or end.
  • A large hunk might apply better—either entirely or in part—if it was broken up into smaller hunks.
  • A hunk removes lines with slightly different content than those currently present in the file.

Use Refresh Status in Status Window to see External Changes

If you use Mercurial from the command line and want to make sure these external changes are reflected in the IDE, in the IDE open up the Mercurial > Status window and hit the Refresh Status icon on the Status Window's toolbar bar.

Commit of 1000's of files not Supported

Due to a system limitation with exec it is not possible to commit large numbers (1000's) of files using the plugin. The actual number is system dependent. If you have a new project such as OpenJDK (+20k files) before opening it in the IDE run the following from the command line under the top level project directory: hg init, hg add, hg commit -m"initial commit".

Initialize not supported in Favorites View

Initialize is not supported in Favorites View. The user will be notified when this is attempted. #122107

New File reported as LocallyRemoved

If you remove a file and create a new file of the same name before committing the removal, the status of the file is repored as LocallyRemoved. When the removal if committed the status of the file changes to LocallyNew. #127137

Issues addressed in this release



  • Show Incoming/Outgoing added


  • Search History improvement


  • Show History - add option to Show/Hide Merges


  • Menu restructured to match UI spec


  • Add Backout support to Search History


  • Replace rollback with Strip mq extension


  • Clone Other now creates Push/Pull path defaults in the project .hg/hgrc


  • Open Export Diff patch on completion in the IDE


  • Replace Push/Pull password in the Output window with some **** text


  • Add search for Incoming/Outgoing


  • Allow Update to a specified revision


  • If the user is creating a project that will have sources outside the project dir we warn them that a common ancestor

needs to be set for root and they can cancel if they do not wish this to happen. #128096

  • Allow exporting of a File diff


  • On diff export display files participating in a changeset


  • Added additional info in revert dialog



  • Event thread blocked by i/o


  • Mercurial blocking AWT thread for long periods at IDE startup.


  • Long delay showing Mercurial popup the first time


  • Optimize UI for Large repos


  • Fetching Revisions on Export is slow


  • Excessive logging of exceptions for unknown files



  • Status not updated after reverting a deletion


  • Default path for exporting diff should optimazed for win user


  • Cannot refactor/rename unmanaged files


  • Missing save before commit


  • Fetch fails when Proxy needed


  • Invalid Output when doing Push to repo with nested NB projects


  • Problem, when committing large numbers of files at once


  • Duplicate items added to .hgignore


  • Output should have different tabs for different repositories


  • No confimation dialog before rollback


  • Inconsistent status annotation after rollback


  • Export Diff does not work when you click OK before fetching revisions is finished


  • Merge calls exec in AWT thread


  • Output window output stream not closed


  • Deleted files are almost invisible in the list, very pale blue doesn't show up very clearly


  • No output from Fetch menu item

#128143 #128146 #128147 #128150

  • A11Y various fixes


  • Show Annotations does not work


  • Export fails when hitting OK before vevisions fetched


  • Dialogs with Fetrching Revision on large repos


  • Export Diff Patch: Used OpenFileDialog instead of SaveFileDialog


  • HgUtils.isIgnored does not match patterns starting with ^ correctly
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo