##// END OF EJS Templates
revset: make use of natively-computed set for 'draft()' and 'secret()'...
Pierre-Yves David -
r25622:85294076 default
parent child Browse files
Show More
@@ -124,3 +124,7 b' head()'
124 head() - public()
124 head() - public()
125 draft() and head()
125 draft() and head()
126 head() and author("mpm")
126 head() and author("mpm")
127
128 # testing the mutable phases set
129 draft()
130 secret()
@@ -1464,6 +1464,13 b' def parents(repo, subset, x):'
1464
1464
1465 def _phase(repo, subset, target):
1465 def _phase(repo, subset, target):
1466 """helper to select all rev in phase <target>"""
1466 """helper to select all rev in phase <target>"""
1467 repo._phasecache.loadphaserevs(repo) # ensure phase's sets are loaded
1468 if repo._phasecache._phasesets:
1469 s = repo._phasecache._phasesets[target] - repo.changelog.filteredrevs
1470 s = baseset(s)
1471 s.sort() # set are non ordered, so we enforce ascending
1472 return subset & s
1473 else:
1467 phase = repo._phasecache.phase
1474 phase = repo._phasecache.phase
1468 condition = lambda r: phase(repo, r) == target
1475 condition = lambda r: phase(repo, r) == target
1469 return subset.filter(condition, cache=False)
1476 return subset.filter(condition, cache=False)
General Comments 0
You need to be logged in to leave comments. Login now