# HG changeset patch # User Anton Shestakov # Date 1554283234 -28800 # Node ID 931c8f6f4b1be6ea9e2a46062ddc1698748f37cb # Parent 14437b18b024e9b00e76b29ca44cd77031e4f4a4 stack: simplify phasecache checks in _stackcandidates() diff -r 14437b18b024 -r 931c8f6f4b1b 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()