stack: simplify phasecache checks in _stackcandidates()
authorAnton Shestakov <av6@dwimlabs.net>
Wed, 03 Apr 2019 17:20:34 +0800
changeset 4474 931c8f6f4b1b
parent 4473 14437b18b024
child 4475 256b28ce03e3
stack: simplify phasecache checks in _stackcandidates()
hgext3rd/topic/stack.py
--- a/hgext3rd/topic/stack.py	Fri Apr 05 17:45:59 2019 +0200
+++ b/hgext3rd/topic/stack.py	Wed Apr 03 17:20:34 2019 +0800
@@ -43,9 +43,7 @@
     this area.
     """
     phasecache = repo._phasecache
-    if not phasecache._phasesets:
-        return repo.revs('(not public()) - obsolete()')
-    if any(s is None for s in phasecache._phasesets):
+    if not phasecache._phasesets or None in phasecache._phasesets:
         return repo.revs('(not public()) - obsolete()')
 
     result = set()