changeset 4474:931c8f6f4b1b

stack: simplify phasecache checks in _stackcandidates()
author Anton Shestakov <av6@dwimlabs.net>
date Wed, 03 Apr 2019 17:20:34 +0800
parents 14437b18b024
children 256b28ce03e3
files hgext3rd/topic/stack.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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()