diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -397,9 +397,9 @@ and dest in changes.salvaged ): minor[dest] = value - elif not isancestor(new_tt, other_tt): + elif changes is not None and dest in changes.merged: minor[dest] = value - elif changes is not None and dest in changes.merged: + elif not isancestor(new_tt, other_tt): minor[dest] = value