MercurialVersionControlReleaseNotes1 5 0

Mercurial NetBeans Plugin Module Release Notes


Release Notes for Revision

Supported Mercurial Version

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

  • Windows: there is a known mercurial bug that effects Status values in 0.9.3 which has been fixed in 0.9.4.
  • OpenSolaris: will work with 0.9.3 and above. Package available at for 0.9.5.
The plug-in will work with 0.9.3 that ships with OpenSolaris and is not effected by the above Windows issue.



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

  • There are issues with "hg view" in the current TortoiseHg 0.3 release: "This combination of instructions (FAQ) and tortoisehg-0.3 doesn't result in a working "hg view", as the tcl script "hgk" is missing in tortoisehg-0.3 and the FAQ doesn't mention that it needs to be installed."

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.

Merge Support in MacOSX

Mercurial official 0.9.5 release for the Mac ships with hgmerge, but this release is installed into /usr/local/bin and this is not on the default PATH for MacOSX.

  • 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">

Merge Support in Windows

There are no merge tools shipped on Windows by default. To get merge working on Windows you have a number of choices depending on the Mercurial release you install. It is currently not possible to use the internal Resolve Conflict tool on Windows.

  • Unofficial "Batteries Included" Windows release of Hg
  • Official Windows release of Mercurial
  • If the official release is used then the user needs to install another Merge tool and modify the <MercurialInstallDir>\Mercurial.ini to reference this Merge tool. You may also need to create a wrapper script to launch the Merge tool, as the order of parameters it needs may be different to those Mercurial passes to it. Refer to background information on Merge in Mercurial.

For instance you may want to use the 3 way diff tool, kdiff3 (hgmerge only provides 2 way diff):

  • Download and install kdiff3
  • Modify <MercurialInstallDir>\Mercurial.ini:
merge = "C:\Program Files\Mercurial\kdiff3.cmd"
  • Create wrapper script kdiff3.cmd:
@echo off
"c:\kdiff3-0.9.92\kdiff3.exe" --auto --L1 Base --L2 Local --L3 Other %2 %1 %3 -o %1
if %errorlevel% neq 0 (exit 1) else (exit 0)

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


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. Invoke it using Mercurial > View.

  • Supported on OpenSolaris and Windows platforms. Hgk is not available on the Mac.
  • On Windows, you need to install the "unofficial batteries included" release and add <MercurialInstallDir>\scripts to your PATH:
  • Control Panel> System> Advanced> Environment Variables: System Variables - select Path, choose Edit and add <MercurialInstallDir>\scripts
  • 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.
  • View (Hgk) Screenshot

New File reported as LocallyRemoved

If you remove a file and create a new fiel 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



  • Search History improvement.


  • Support Fetch extension


  • Incoming/Outgoing view.


  • Optimize UI for Large repos



  • Revert modifications creates *.orig and starts update


  • Files for merge should be ignored.


  • Export Diff should create parent folder.


  • Exclude from commit is not remembered.


  • Hg view is complaning about missing hgk


  • Mercurial User Name options does not work


  • .hgignore disappears from status view after refresh


  • Username and Password on Cone Other not working


  • Annotate fails when revision numbers differ in digit length


  • Redundent forceStatusRefresh() call in Revert Modifications


  • Push command should not use -f by default


  • Show History throws NPE


  • NullPointerException when click Revert button


  • Revision number in Status labels and performance


  • Freeze while opening popup on project node


  • NPE on cloning local repository


  • Long delay showing Mercurial popup the first time


  • Fetch fails when Proxy needed


  • IllegalArgumentException: Parameter file was not normalized.


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


  • Summary and diff buttons in Mercurial Out tab has null description


  • Freeze upon expanding Hg-controlled project node with large ignored subdir


  • Clone annotation is not displayed immediately


  • Ignored file not reported as ignored


  • Ignore does not work peoperly if .hgignore file contains comments


  • Unnecessary calls to HgUtils.isIgnoreD


  • HgUtils.isIgnored returns false for a file which mercurial ignores


  • Repository URL field of Clone Other should be resizable


  • Status of ignored files not reported correctly


  • HgUtils.getProject(context) is incorrect


  • Annotations in views are not shown.


  • Optimization to HgCommand.getSingleStatus


  • Cloned project not opened


  • Review Bundle Files


  • "temporory" should be "temporary"


  • Unhandled Error on Copy & Paste - Refactor Copy


  • Cancel on Import dialog doesn't work


  • Folder with hg repository cannot be deleted in ide


  • Statement of files which should be committed after project's incialization is not full


  • Provide more details about cloning in status line


  • NullPointerException at org.netbeans.modules.mercurial.ui.diff.ExportDiffPanel.getSelectedRevision


  • File browser for Export/Import diff/patch doesn't remember lastly choosen directory


  • User should be warmed if some file is going to be overwritten during diff export


  • No mnemonics for menu item in Versioning menu


  • Versioning > Diff blocks EQ


  • Cannot rename a file which is not yet added to a repository


  • non-standard way for saving values


  • New project wizard stuck when creating a project in mercurial repository


  • missing save before commit


  • NPE and wrong file created when copying java file


  • java.util.MissingResourceException: Can't find resource for bundle org.openide.util.NbBundle$PBundle, key MercurialPanel.label.revision


  • Changing task is running when userdir is in mercurial repository
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