##// END OF EJS Templates
branchmap: avoid changelog and attribute lookups in replacecache()...
Gregory Szorc -
r40411:76d4272b default
parent child Browse files
Show More
@@ -130,18 +130,21 b' def replacecache(repo, bm):'
130 130
131 131 This is likely only called during clone with a branch map from a remote.
132 132 """
133 cl = repo.changelog
134 clrev = cl.rev
135 clbranchinfo = cl.branchinfo
133 136 rbheads = []
134 137 closed = []
135 138 for bheads in bm.itervalues():
136 139 rbheads.extend(bheads)
137 140 for h in bheads:
138 r = repo.changelog.rev(h)
139 b, c = repo.changelog.branchinfo(r)
141 r = clrev(h)
142 b, c = clbranchinfo(r)
140 143 if c:
141 144 closed.append(h)
142 145
143 146 if rbheads:
144 rtiprev = max((int(repo.changelog.rev(node))
147 rtiprev = max((int(clrev(node))
145 148 for node in rbheads))
146 149 cache = branchcache(bm,
147 150 repo[rtiprev].node(),
General Comments 0
You need to be logged in to leave comments. Login now