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.
--- 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