MacHg icon

Working With Branches

In Mercurial you can work with named branches or with un-named or anonymous branches. To see the named branches throughout the interface of MacHg change the appropriate setting in the appearance tag of the preferences as follows:

To show branch information:

  1. Open the MacHg preferences and select the Appearance tab.

  2. Ensure the option "Show Branch Column" is checked.

Adding a Branch

To add a new branch to your repository you create a new label as follows:

To add a branch:

  1. Choose the menu item Repository > Add Revision Label...

  2. Select the Branch tab

  3. Enter the name of the new branch.

Switching to a named branch

To switch to a named branch in your repository switch to the labels panel of the history view find the named branch, then click on this label to move the history view to show this label. Then simply update to this revision. In steps:

To update to a named branch:

  1. Switch to the History view.

  2. Open the Labels panel at the bottom of the History view.

  3. Click on the named branch you are interested in. (This shows the named branch in the history panel above.)

  4. Either:

    • Control click on the named branch in the labels and choose the contextual menu Update Repository to Revision

    • Control click on shown revision in history panel above and choose the contextual menu Update Repository to Revision

    • Choose menu Update Repository to Revision... and choose the revision you have found through the labels panel.


Related Topics

Merging Branches

External Links

Branching in Mercurial

Named Branches