Hide a branch in Mercurial / TortoiseHg
Asked Answered
H

3

13

We are planning on having named branches for client releases of from a core version of our product.

We do not wish to clutter TortoiseHg's branch diagram with unrelated branches i.e. the diagram is going to get massive as we add more and more client's.

Is there a way to hide everything else other than the locally current branch?

Hern answered 4/12, 2012 at 9:23 Comment(0)
P
9

I don't think that there is a way to do it automatically, but you can filter the TortoiseHg graph on a lot of criteria and by named branch is one of the options.

On the Revision Details task page you can click on the filter icon (the one that is a magnifying glass). This brings up an extra toolbar above the revision graph with various filter options. The one on the far right is a drop down that says * Show All * by default. Click that and select the branch that you want to see. You can close this toolbar and the filter will remain applied (the repository tab indicates this by having the filtered branch in the tab)

Phatic answered 4/12, 2012 at 11:27 Comment(0)
A
25
  1. View → Filter toolbar (Ctrl-S)
  2. In the box, enter something like this:

    branch(default) or branch("branch 1") or branch("branch 2")

  3. Press Enter

Now only the branches default, branch 1 and branch 2 are visible, all others are hidden.

You can close the filter toolbar again without affecting the current filter. The background will stay yellow to alert you that there is an active filter.

If you uncheck the box "filter" it will show all changesets again, but those not matching the curent filter will be greyed out.

To create more advanced filters you can press the small ellipsis (…) to open a query wizard.

Acidimetry answered 25/10, 2013 at 16:31 Comment(1)
Using the revset expression/filter is much more useful than showing a single branch (which is only practical in the most trivial cases). The serach can use the full revset support, such as ancestors to also include other branches that worked their way in to the branches (or revisions) of interest.Fanchette
P
9

I don't think that there is a way to do it automatically, but you can filter the TortoiseHg graph on a lot of criteria and by named branch is one of the options.

On the Revision Details task page you can click on the filter icon (the one that is a magnifying glass). This brings up an extra toolbar above the revision graph with various filter options. The one on the far right is a drop down that says * Show All * by default. Click that and select the branch that you want to see. You can close this toolbar and the filter will remain applied (the repository tab indicates this by having the filtered branch in the tab)

Phatic answered 4/12, 2012 at 11:27 Comment(0)
H
3

You have at least two choices:

  1. Clone to special repo single branch, work around this repo and pull|push to big repo with customer branches on request
  2. TortoiseHG - Global Settings - <Repo> settings (or from workbench: Select repo - File - Settings) - Workbench - Dead Branches.

Define all "must be hidden in workbench" branches here

Dead Branches

H answered 4/12, 2012 at 16:43 Comment(1)
Option (2) does not hide them in workbench from the graph/history view, only from the branches dropdown list. By default, closed branches are not shown there.Scavenge

© 2022 - 2024 — McMap. All rights reserved.