stack: improve set combination logic
authorAnton Shestakov <av6@dwimlabs.net>
Sat, 06 Apr 2019 15:50:15 +0200
changeset 4478 94743877e50b
parent 4477 faf99d48eda9
child 4487 d972041022cb
stack: improve set combination logic
hgext3rd/topic/stack.py
--- a/hgext3rd/topic/stack.py	Sat Apr 06 15:49:22 2019 +0200
+++ b/hgext3rd/topic/stack.py	Sat Apr 06 15:50:15 2019 +0200
@@ -46,10 +46,7 @@
     if not phasesets or None in phasesets[phases.draft:]:
         return repo.revs('(not public()) - obsolete()')
 
-    result = set()
-    for s in phasecache._phasesets[phases.draft:]:
-        result |= s
-
+    result = set.union(*phasesets[phases.draft:])
     result -= obsolete.getrevs(repo, 'obsolete')
     return result