diff mercurial/merge.py @ 16255:ca5cc2976574 stable

merge: handle linear update to symlink correctly (issue3316) This fixes a regression introduced by fcf66193b186. If no file-level merge is needed, we can update flags directly, otherwise we have a conflict to resolve in filemerge.
author Matt Mackall <mpm@selenic.com>
date Tue, 13 Mar 2012 16:28:08 -0500
parents fcf66193b186
children c655e4acaa82 7a5524f240ad
line wrap: on
line diff
--- a/mercurial/merge.py	Tue Mar 13 15:12:26 2012 -0500
+++ b/mercurial/merge.py	Tue Mar 13 16:28:08 2012 -0500
@@ -173,9 +173,10 @@
         if m and m != a: # changed from a to m
             return m
         if n and n != a: # changed from a to n
-            if n == 'l' or a == 'l':
-                # can't automatically merge symlink flag change here, let
-                # filemerge take care of it
+            if (n == 'l' or a == 'l') and m1[f] != ma[f]:
+                # can't automatically merge symlink flag when there
+                # are file-level conflicts here, let filemerge take
+                # care of it
                 return m
             return n
         return '' # flag was cleared