##// END OF EJS Templates
copies: move from a copy on branchpoint to a copy on write approach...
marmoute -
r43594:ffd04bc9 default
parent child Browse files
Show More
@@ -270,15 +270,19 b' def _changesetforwardcopies(a, b, match)'
270 270 childcopies = {
271 271 dst: src for dst, src in childcopies.items() if match(dst)
272 272 }
273 # Copy the dict only if later iterations will also need it
274 if i != len(children[r]) - 1:
275 newcopies = copies.copy()
276 else:
277 273 newcopies = copies
278 274 if childcopies:
279 275 newcopies = _chain(newcopies, childcopies)
276 # _chain makes a copies, we can avoid doing so in some
277 # simple/linear cases.
278 assert newcopies is not copies
280 279 for f in removed:
281 280 if f in newcopies:
281 if newcopies is copies:
282 # copy on write to avoid affecting potential other
283 # branches. when there are no other branches, this
284 # could be avoided.
285 newcopies = copies.copy()
282 286 del newcopies[f]
283 287 othercopies = all_copies.get(c)
284 288 if othercopies is None:
General Comments 0
You need to be logged in to leave comments. Login now