##// END OF EJS Templates
branchmap: issue a single call to `ancestors` for all heads...
Pierre-Yves David -
r22356:3c8fb243 default
parent child Browse files
Show More
@@ -252,15 +252,11 b' class branchcache(dict):'
252 newheadrevs.sort()
252 newheadrevs.sort()
253 bheadset.update(newheadrevs)
253 bheadset.update(newheadrevs)
254
254
255 # This loop prunes out two kinds of heads - heads that are
255 # This prunes out two kinds of heads - heads that are superseded by
256 # superseded by a head in newheadrevs, and newheadrevs that are not
256 # a head in newheadrevs, and newheadrevs that are not heads because
257 # heads because an existing head is their descendant.
257 # an existing head is their descendant.
258 while newheadrevs:
258 ancestors = set(cl.ancestors(newheadrevs, min(bheadset)))
259 latest = newheadrevs.pop()
259 bheadset -= ancestors
260 if latest not in bheadset:
261 continue
262 ancestors = set(cl.ancestors([latest], min(bheadset)))
263 bheadset -= ancestors
264 bheadrevs = sorted(bheadset)
260 bheadrevs = sorted(bheadset)
265 self[branch] = [cl.node(rev) for rev in bheadrevs]
261 self[branch] = [cl.node(rev) for rev in bheadrevs]
266 tiprev = bheadrevs[-1]
262 tiprev = bheadrevs[-1]
General Comments 0
You need to be logged in to leave comments. Login now