MercurialVersionControlReleaseNotes1 4 2

Mercurial NetBeans Plugin Module Release Notes


Release Notes for Revision 1.4.2

Supported Mercurial Version

This release will work with Mercurial 0.9.4 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 is a respin package that addresses this issue and can be used until the official 12-01-2007 package is refreshed.
  • Mercurial > View requires Hgk to work - it is not being picked up in the TortoiseHg release as it is under <Mercurial Install Dir>\scripts and this needs to be added to your Windows Path settings #123729. Fixed in Head.

Clone Other, Push/Pull Other supported protocols

Only HTTP and SSH are supported.

  • Mercurial does not support HTTP(S) authentication in non-interactive mode, so we cannot support HTTP(S) authentication from the plug-in, for Clone Other or Push/Pull Other.
  • SSH is supported - you need to make sure to have the certificate of the server you are trying to contact already cached on the client before doing a Clone Other or Push/Pull Other. This can be done by just connecting to the SSH server using the command line or some SSH utility beforehand. #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.

Editing Properties in Property Dialog

Launch the Mercurial > Properties. To edit a Property double click on a row in the table. Then edit the property in the Value field and click on Modify to make the change. This is similar to the Subversion properties dialog. #122119

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


Export Diff and Parent folder

If you do an Export Diff and the folder you want to save the diff into does not exist the Export fails #123717. Fixed in Head.

Exclude from Commit

When you choose to exclude files in the Commit dialog, this exclusion setting is not remembered between invocations of Commit #123720. Fixed in Head.

Refresh status and .hgignore

When you do Mercurial > Ignore on a file this ignore state is stored in the <Project dir>/.hgignore file. This modified .hgignore appears in the Status Window, but hitting Refresh makes it disappear #123735. Fixed in Head.

Mercurial Username Options

When you set the Username in Mercurial Options or in the Mercurial Project Properties dialog they are not being used in the Commit and so are not seen in the History output #123744. Fixed in Head.

Annotation popup problem

If you Show Annotations on a File which has multiline commit comments and then hover over the Annotation entry with this multiline comment, Annotation popup will fail #123787. Fixed in Head.

Canceling Clone Other

Canceling Clone Other may result in spawned processes being left running, such as when an ssh URl is specified. These processes need to be terminated manually. #121911

Copy semantics

If you copy a file under a Hg controlled project, changes in the source are not propagated to the copy, which would be the normal Hg behavior. This is a current limitation of the Platforms Version control Interceptor and an RFE has been filed to address it.#102523

  • Note: correct Hg copy propagation does work for rename as this event is caught by the Interceptor.

Revert does not work across a rename or delete

If you have renamed a file under a Hg controlled project and then imvoke "Mercurial | Revert Modifications", you cannot revert to a version before the rename.#122263. This is a limitation of Hg and cannot be fixed until the issue is resolved in Hg itself #Issue834.

Revert on very large repositories can be slow

If you modify a local file, save it and then revert it using Mercurial > Revert Modifications on a very large repository (+50k files), it may take over a minute to complete #123361. This is a known mercurial issue #Issue857.

Ignored Files: Merge and Revert Modification Backup Files

Some *.orig and *.orig.* files can be generated by Merge and Revert Modifications. Adding entries for them into a <project>/.hgignore will make sure the Plugin Ignores them so they are not displayed in the Status View and are shown in Project and File View as grayed files.

  • No <project>/.hgignore:
  • Currently if there is no <project>/.hgignore file this will be generated automatically by Merge or Revert Modifications and an entry for *.orig added to it.
  • On Windows however *.orig.* files are also generated during Merge and you need to add an entry for *.orig.* files manually #123637. Fixed in Head.
  • Existing <project>/.hgignore:
  • If you have your own custom <project>/.hgignore file you will need to add both entries for *.orig and *.orig.* files manually. The same is true if you are specifying custom per user ignore files in ~/.hgrc under:
    [Ui]ignore=<custom ignore file>

This will be corrected in a later build, with the correct entries being added and if a custom .hgignore file exists prompting the user to see if they want these entries added for them or not.

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