##// END OF EJS Templates
copies: avoid unnecessary copying of copy dict...
Martin von Zweigbergk -
r42687:5ceb9113 default
parent child Browse files
Show More
@@ -297,7 +297,7 b' def _changesetforwardcopies(a, b, match)'
297 if r == b.rev():
297 if r == b.rev():
298 _filter(a, b, copies)
298 _filter(a, b, copies)
299 return copies
299 return copies
300 for c in children[r]:
300 for i, c in enumerate(children[r]):
301 childctx = repo[c]
301 childctx = repo[c]
302 if r == childctx.p1().rev():
302 if r == childctx.p1().rev():
303 parent = 1
303 parent = 1
@@ -309,7 +309,13 b' def _changesetforwardcopies(a, b, match)'
309 if not match.always():
309 if not match.always():
310 childcopies = {dst: src for dst, src in childcopies.items()
310 childcopies = {dst: src for dst, src in childcopies.items()
311 if match(dst)}
311 if match(dst)}
312 childcopies = _chain(copies, childcopies)
312 # Copy the dict only if later iterations will also need it
313 if i != len(children[r]) - 1:
314 copies = copies.copy()
315 if childcopies:
316 childcopies = _chain(copies, childcopies)
317 else:
318 childcopies = copies
313 for f in childctx.filesremoved():
319 for f in childctx.filesremoved():
314 if f in childcopies:
320 if f in childcopies:
315 del childcopies[f]
321 del childcopies[f]
General Comments 0
You need to be logged in to leave comments. Login now