Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suppress closed branches in hg view

Is there a way to prevent closed branches from showing up at the top when running the hg view command? I know about the 'limit' option. I don't really need closed branches to completely disappear from the view, but it would be nice if they would stay down (they were closed long ago), rather than popping up near the top every time I perform a merge.

hg view with a closed branch near current development

Here is an example screenshot where this happens. You can see on the right that the times are all mixed up, which isn't too terrible in this case, but in my real repo the closed-off branches pop up near the top everytime I have a merge, which gets annoying when the closed-off branch is well over a year ago and truly not interesting.

like image 417
david Avatar asked Oct 29 '10 12:10

david


People also ask

How do I close my HG branch?

hg commit --close-branch -X * -m "Closing branch."

How do I delete a branch in Mercurial?

You cannot. You can close the branch to hide it from the list of active branches, but you cannot completely delete it. This happens because in mercurial and in git the "branch" term means different things.


1 Answers

Nobody has updated hg view to be aware of closed branches. The extension is mostly abandoned these days since none of the core developers use it or know how to program in Tcl/Tk. We talk about removing hgk at every major release...

Your best bet is to upgrade to TortoiseHg and use the command hgtk log to view the repository.

The best thing is that it works on both Windows and Linux -- see the hgtk wiki page. In hgtk you can filter using the new revision sets syntax. This revset query will find open changesets:

ancestors(head() and not closed())
like image 184
Martin Geisler Avatar answered Sep 26 '22 06:09

Martin Geisler