##// END OF EJS Templates
clfilter: use filtering in `visiblebranchmap`...
Pierre-Yves David -
r18103:83cb1a1a default
parent child Browse files
Show More
@@ -355,23 +355,4 b' def visibleheads(repo):'
355
355
356 def visiblebranchmap(repo):
356 def visiblebranchmap(repo):
357 """return a branchmap for the visible set"""
357 """return a branchmap for the visible set"""
358 # XXX Recomputing this data on the fly is very slow. We should build a
358 return repo.filtered('unserved').branchmap()
359 # XXX cached version while computing the standard branchmap version.
360 sroots = repo._phasecache.phaseroots[phases.secret]
361 if sroots or repo.obsstore:
362 vbranchmap = {}
363 for branch, nodes in repo.branchmap().iteritems():
364 # search for secret heads.
365 for n in nodes:
366 if repo[n].phase() >= phases.secret:
367 nodes = None
368 break
369 # if secret heads were found we must compute them again
370 if nodes is None:
371 s = repo.set('heads(branch(%s) - secret() - extinct())',
372 branch)
373 nodes = [c.node() for c in s]
374 vbranchmap[branch] = nodes
375 else:
376 vbranchmap = repo.branchmap()
377 return vbranchmap
General Comments 0
You need to be logged in to leave comments. Login now