The NetBeans IDE provides support for the Mercurial Queues extension. The IDE's Mercurial Queues support allows you to create, review or switch between patches within the IDE, as well as refresh patches with local modifications as you fix bugs or update to a new base revision. This document demonstrates how to perform basic patch-specific tasks in the IDE by guiding you through the standard workflow when using Mercurial versioning software for managing patches.
To complete this tutorial, you need the following software and resources.
Software or Resource | Version Required |
---|---|
NetBeans IDE | Version 7.4 or 8.0 |
Java Development Kit (JDK) | Version 7 or 8 |
Mercurial client software | 1.04 or higher |
Note: Refer to the Using Mercurial Support in NetBeans IDE for information on how to install Mercurial client software on your system.
Since Mercurial Queues is an extension, you must explicitly enable it before you can use it.
To start running Mercurial Queues on your Mercurial repository, you need to complete the following steps:
[extensions] hgext.mq =
To create a patch, you need to complete the following steps:
Note: The provided description of a patch will be used as a commit message when turning the patch into a permanent changeset.
To save your progress into the patch you are creating , you need to complete the following steps:
Note: The provided description of a patch will be used as a commit message when turning the patch into a permanent changeset.
To generate a patch for review and compare revisions of a patch side by side, you need to complete the following steps:
Note: The Graphical Diff Viewer highlights changes in the files using the following color encoding.
Blue ( ) | Indicates lines that have been changed since the earlier patch. |
Green ( ) | Indicates lines that have been added since the earlier patch. |
Red ( ) | Indicates lines that have been removed since the earlier patch. |
The following icons enable you to make changes directly within the Graphical Diff Viewer.
Icon | Name | Function |
---|---|---|
![]() |
Replace | Inserts the highlighted text from the previous patch into the current patch. |
![]() |
Replace All | Reverts current version of a patch to the state of its selected previous version. |
![]() |
Remove | Removes the highlighted text from the current version of a patch so that it mirrors the previous version of a patch. |
To switch to a particular patch in a patch queue series, you need to complete the following steps:
Note: To switch between patches there must be no local modifications in the working copy, otherwise the switch fails.
Notes:
Once your work on a patch is done, it can be turned into a permanent changeset.
To turn all applied patches in a patch queue series into regular changesets, complete the following steps:
Note: To apply all saved patches in the repository, choose Team > Queues > Push All Patches from the main menu.
Note: All patches in the series before the selected patch will also be finished.
This tutorial showed how to perform basic patch-specific tasks in the IDE by guiding you through the standard workflow when using Mercurial versioning software for managing patches. It demonstrated how to enable the Mercurial Queues support in the NetBeans IDE and perform basic tasks on patches while introducing you to some of the Mercurial specific features included in the IDE.
For related material see the following documents: