diff --git a/mercurial/copies.py b/mercurial/copies.py index 36bf44d476666f834d3a1795dfef579a19025f42_bWVyY3VyaWFsL2NvcGllcy5weQ==..31c50763ff6f1e3fcaeba506e48b0dbf33cdc766_bWVyY3VyaWFsL2NvcGllcy5weQ== 100644 --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -405,5 +405,7 @@ # changeset based copies. It was made without regards with # potential filelog related behavior. if parent == 1: + if newcopies is copies: + newcopies = copies.copy() minor, major = othercopies, newcopies else: @@ -408,6 +410,9 @@ minor, major = othercopies, newcopies else: - minor, major = newcopies, othercopies + # we do not know if the other dict is a copy or not, so we + # need to blindly copy it. Future change should make this + # unnecessary. + minor, major = newcopies, othercopies.copy() copies = _merge_copies_dict(minor, major, isancestor, changes) all_copies[c] = copies