Mercurial > evolve
comparison hgext3rd/topic/stack.py @ 4478:94743877e50b
stack: improve set combination logic
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 06 Apr 2019 15:50:15 +0200 |
parents | faf99d48eda9 |
children | 48521a49a07e |
comparison
equal
deleted
inserted
replaced
4477:faf99d48eda9 | 4478:94743877e50b |
---|---|
44 """ | 44 """ |
45 phasesets = repo._phasecache._phasesets | 45 phasesets = repo._phasecache._phasesets |
46 if not phasesets or None in phasesets[phases.draft:]: | 46 if not phasesets or None in phasesets[phases.draft:]: |
47 return repo.revs('(not public()) - obsolete()') | 47 return repo.revs('(not public()) - obsolete()') |
48 | 48 |
49 result = set() | 49 result = set.union(*phasesets[phases.draft:]) |
50 for s in phasecache._phasesets[phases.draft:]: | |
51 result |= s | |
52 | |
53 result -= obsolete.getrevs(repo, 'obsolete') | 50 result -= obsolete.getrevs(repo, 'obsolete') |
54 return result | 51 return result |
55 | 52 |
56 class stack(object): | 53 class stack(object): |
57 """object represent a stack and common logic associated to it.""" | 54 """object represent a stack and common logic associated to it.""" |