##// END OF EJS Templates
branchmap: stop useless rev -> node -> rev round trip...
Pierre-Yves David -
r20262:cf450ee3 default
parent child Browse files
Show More
@@ -230,17 +230,15 b' class branchcache(dict):'
230 getbranchinfo = cl.branchinfo
230 getbranchinfo = cl.branchinfo
231 for r in revgen:
231 for r in revgen:
232 branch, closesbranch = getbranchinfo(r)
232 branch, closesbranch = getbranchinfo(r)
233 node = cl.node(r)
233 newbranches.setdefault(branch, []).append(r)
234 newbranches.setdefault(branch, []).append(node)
235 if closesbranch:
234 if closesbranch:
236 self._closednodes.add(node)
235 self._closednodes.add(cl.node(r))
237 # if older branchheads are reachable from new ones, they aren't
236 # if older branchheads are reachable from new ones, they aren't
238 # really branchheads. Note checking parents is insufficient:
237 # really branchheads. Note checking parents is insufficient:
239 # 1 (branch a) -> 2 (branch b) -> 3 (branch a)
238 # 1 (branch a) -> 2 (branch b) -> 3 (branch a)
240 for branch, newnodes in newbranches.iteritems():
239 for branch, newheadrevs in newbranches.iteritems():
241 bheads = self.setdefault(branch, [])
240 bheads = self.setdefault(branch, [])
242 bheadrevs = [cl.rev(node) for node in bheads]
241 bheadrevs = [cl.rev(node) for node in bheads]
243 newheadrevs = [cl.rev(node) for node in newnodes]
244 ctxisnew = bheadrevs and min(newheadrevs) > max(bheadrevs)
242 ctxisnew = bheadrevs and min(newheadrevs) > max(bheadrevs)
245 # Remove duplicates - nodes that are in newheadrevs and are already
243 # Remove duplicates - nodes that are in newheadrevs and are already
246 # in bheadrevs. This can happen if you strip a node whose parent
244 # in bheadrevs. This can happen if you strip a node whose parent
General Comments 0
You need to be logged in to leave comments. Login now