# HG changeset patch # User Gilles Moris # Date 1272959836 -7200 # Node ID 21a7ae13208fc8a9deb8f69c93f44ce382c88496 # Parent 6a64813276ed854e5d41e9ecd42aaaca437fa9b4 merge: avoid to break the dirstate copy status on moved files In the case a file is locally tracked as copied in dirstate, and that a merge affects this file, this file should not be marked as modified in dirstate, as this will break the current copy state. Note: only affect working directory merge, not branch merge. diff -r 6a64813276ed -r 21a7ae13208f mercurial/merge.py --- a/mercurial/merge.py Sat May 15 17:48:49 2010 -0500 +++ b/mercurial/merge.py Tue May 04 09:57:16 2010 +0200 @@ -386,7 +386,8 @@ # of that file some time in the past. Thus our # merge will appear as a normal local file # modification. - repo.dirstate.normallookup(fd) + if f2 == fd: # file not locally copied/moved + repo.dirstate.normallookup(fd) if move: repo.dirstate.forget(f) elif m == "d": # directory rename