comparison hgext3rd/topic/stack.py @ 5426:86736040b0ec

topic: compatibility with sparse phaseroots and phasesets in 5.5 See also: https://phab.mercurial-scm.org/D8694 and its stack.
author Joerg Sonnenberger <joerg@bec.de>
date Tue, 21 Jul 2020 11:59:28 +0800
parents 485a9f3490c9
children dee7d1e2b559 954d7ea5cd67
comparison
equal deleted inserted replaced
5425:2c5e4339538a 5426:86736040b0ec
42 42
43 The intend is to build something more efficient than what revsets do in 43 The intend is to build something more efficient than what revsets do in
44 this area. 44 this area.
45 """ 45 """
46 phasesets = repo._phasecache._phasesets 46 phasesets = repo._phasecache._phasesets
47 if not phasesets or None in phasesets[phases.draft:]: 47 if not phasesets:
48 return repo.revs(b'(not public()) - obsolete()') 48 return repo.revs(b'(not public()) - obsolete()')
49 49
50 result = set.union(*phasesets[phases.draft:]) 50 result = set.union(*[phasesets[phase] for phase in phases.trackedphases])
51 result -= obsolete.getrevs(repo, b'obsolete') 51 result -= obsolete.getrevs(repo, b'obsolete')
52 return result 52 return result
53 53
54 class stack(object): 54 class stack(object):
55 """object represent a stack and common logic associated to it.""" 55 """object represent a stack and common logic associated to it."""