diff hgext3rd/topic/stack.py @ 5426:86736040b0ec

topic: compatibility with sparse phaseroots and phasesets in 5.5 See also: https://phab.mercurial-scm.org/D8694 and its stack.
author Joerg Sonnenberger <joerg@bec.de>
date Tue, 21 Jul 2020 11:59:28 +0800
parents 485a9f3490c9
children dee7d1e2b559 954d7ea5cd67
line wrap: on
line diff
--- a/hgext3rd/topic/stack.py	Tue Jul 21 11:59:10 2020 +0800
+++ b/hgext3rd/topic/stack.py	Tue Jul 21 11:59:28 2020 +0800
@@ -44,10 +44,10 @@
     this area.
     """
     phasesets = repo._phasecache._phasesets
-    if not phasesets or None in phasesets[phases.draft:]:
+    if not phasesets:
         return repo.revs(b'(not public()) - obsolete()')
 
-    result = set.union(*phasesets[phases.draft:])
+    result = set.union(*[phasesets[phase] for phase in phases.trackedphases])
     result -= obsolete.getrevs(repo, b'obsolete')
     return result