diff --git a/mercurial/copies.py b/mercurial/copies.py index 58e45478b2e847521d052ec89ab9ac1e920e1f4b_bWVyY3VyaWFsL2NvcGllcy5weQ==..461c21605efafe4a4245691f853b1bb1a5dea2e1_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