changeset 11178:21a7ae13208f

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.
author Gilles Moris <gilles.moris@free.fr>
date Tue, 04 May 2010 09:57:16 +0200
parents 6a64813276ed
children aad0c319b96e
files mercurial/merge.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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