diff hgext3rd/topic/stack.py @ 2684:90e11985d0cc

topic: exclude public and topic changeset from branch stack Stack use-case is to show the current work in progress, which are symbolized by the phase draft and secret phase. Moreover showing public changesets in stack output when displaying current branch would display a lot of changesets for long-lived branches and would be quite useless. We also exclude topic changeset form the stack since they already exist on their own stack. getstack revsets didn't needed update when displaying a topic as when a changeset become public, its topic is no longer relevant.
author Boris Feld <boris.feld@octobus.net>
date Thu, 29 Jun 2017 16:49:33 +0200
parents f5d52fa1cd55
children f19b314d8475
line wrap: on
line diff
--- a/hgext3rd/topic/stack.py	Thu Jun 29 16:29:08 2017 +0200
+++ b/hgext3rd/topic/stack.py	Thu Jun 29 16:49:33 2017 +0200
@@ -17,7 +17,7 @@
     elif topic is not None:
         trevs = repo.revs("topic(%s) - obsolete()", topic)
     elif branch is not None:
-        trevs = repo.revs("branch(%s) - obsolete()", branch)
+        trevs = repo.revs("branch(%s) - public() - obsolete() - topic()", branch)
     else:
         raise error.ProgrammingError('neither branch and topic specified (not defined yet)')
     return _orderrevs(repo, trevs)