MercurialVersionControlReleaseNotes1 4 1

Mercurial NetBeans Plugin Module Release Notes

Contents


Release Notes for Revision 1.4.1

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.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: currently only 0.9.3 packages are available. The plug-in will work with 0.9.3 on OpenSolaris and is not effected by the above Windows issue.

Comments

Mercurial Options

To be consistent with CVS, SubVersion and Local History the Mercurial Options have been moved #119561.

  • NetBeans 6.0 Beta2: Tools > Options > Miscellaneous: Mercurial
  • NetBeans 6.0 RC1: Tools > Options > Miscellaneous > Versioning: Mercurial

Hgk Extension always added

hgext.hgk is always being added into ~/.hgrc under extensions to enable View to work. This should be changed so the user is first asked when they choose View if they want to add the extension, if they say no the menu will have no effect and no entry added #122407. Fixed in 1.4.2.

Clone Other, Push/Pull Other supported protocols

Curently only HTTP and SSH are supported.
Mercurial does not support HTTPS authentication in non-interactive mode, so we cannot support HTTPS from the plug-in, for Clone Other or Push/Pull Other. However, for secure connection SSH is supported you just 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:

  • The <file> being patched, modified with any hunks that did apply.
  • The unmodified original file, saved as <file>.orig
  • 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 setup.py. 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. Refer to the following links for more details on setting Mac Environment Variables, QA1255, Setting environment variables for user processes.

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" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>PATH</key>
        <string>/Library/Frameworks/Python.framework/Versions/Current/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin</string>
</dict>
</plist>

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:
[Ui]
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 should be notified when this is tried, currently it does nothing and gives no feedback. #122107

View

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.
  • View (Hgk) Screenshot

Bugs

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

Deletion not working in Favorites View

Deleting a Mercurial project in a mounted filesystem in the Favorites View throws an exception. #122107. Fixed in 1.4.2.

Update Target revision not refreshed after Rollback or Import

If you have a project with multiple revisions, open the Status window and rollback the last commit the Update Target revision is not updated automatically. The same is true for Import. #117890. Fixed in 1.4.2.

Diff Table is not refreshed after commit

When you are diff'ing a number of files nad the diff window lists the files, if you commit the files, the diff table is not automatically updated. You need to hit refresh. #122141. Fixed in 1.4.2.

Diff not working after rename

Rename a file and commit changes. Select some file of it and invoke "Mercurial | Show Annotations" action. Mouse over the annotation column, invoke popup menu and choose "Diff x to (x-1)" action. It shows "Content Not Available" which is incorrect. #122145. Fixed in 1.4.2.

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 Mercurial limitation #issue834.

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