##// END OF EJS Templates
phases: add a function to compute visible heads...
Pierre-Yves David -
r15697:21eb048e default
parent child Browse files
Show More
@@ -236,6 +236,21 b' def pushphase(repo, nhex, oldphasestr, n'
236 finally:
236 finally:
237 lock.release()
237 lock.release()
238
238
239 def visibleheads(repo):
240 """return the set of visible head of this repo"""
241 # XXX we want a cache on this
242 sroots = repo._phaseroots[2]
243 if sroots:
244 # XXX very slow revset. storing heads or secret "boundary" would help.
245 revset = repo.set('heads(not (%ln::))', sroots)
246
247 vheads = [ctx.node() for ctx in revset]
248 if not vheads:
249 vheads.append(nullid)
250 else:
251 vheads = repo.heads()
252 return vheads
253
239 def analyzeremotephases(repo, subset, roots):
254 def analyzeremotephases(repo, subset, roots):
240 """Compute phases heads and root in a subset of node from root dict
255 """Compute phases heads and root in a subset of node from root dict
241
256
General Comments 0
You need to be logged in to leave comments. Login now