Skip to content
Snippets Groups Projects
Commit b6b2849b6115 authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

copies: avoid unwanted side effect from one branch to another

Without this copy, change in a one descendant branch (With "remove" change
only) could affect computation on another descendant branches.

This was not caugh by the test because the test graph are "too simple". I
started writing more test in that regards, but I a submitting this changes
earlier because I want to get more code landed to allow other optimisation work
to happens.

Differential Revision: https://phab.mercurial-scm.org/D9416
parent 07539f50b9bb
No related branches found
No related tags found
No related merge requests found
......@@ -379,7 +379,9 @@
source = prev[1]
newcopies[dest] = (c, source)
assert newcopies is not copies
if changes is not None:
if changes is not None and changes.removed:
if newcopies is copies:
newcopies = copies.copy()
for f in changes.removed:
if f in newcopies:
if newcopies is copies:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment