Comments
Patch
@@ -147,15 +147,15 @@ class branchcache(dict):
"""Given a branchhead cache, self, that may have extra nodes or be
missing heads, and a generator of nodes that are at least a superset of
heads missing, this function updates self to be correct.
"""
cl = repo.changelog
- ctxgen = (repo[r] for r in revgen)
# collect new branch entries
newbranches = {}
- for c in ctxgen:
- newbranches.setdefault(c.branch(), []).append(c.node())
+ getbranch = cl.branch
+ for r in revgen:
+ newbranches.setdefault(getbranch(r), []).append(cl.node(r))
# if older branchheads are reachable from new ones, they aren't
# really branchheads. Note checking parents is insufficient:
# 1 (branch a) -> 2 (branch b) -> 3 (branch a)
for branch, newnodes in newbranches.iteritems():
bheads = self.setdefault(branch, [])