changeset 8747:9b3fd8ab3558

merge: drop a flag update case
author Matt Mackall <mpm@selenic.com>
date Mon, 08 Jun 2009 18:14:44 -0500
parents 84c44c9ed555
children f325574dad1a
files mercurial/merge.py
diffstat 1 files changed, 9 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Mon Jun 08 18:14:44 2009 -0500
+++ b/mercurial/merge.py	Mon Jun 08 18:14:44 2009 -0500
@@ -181,17 +181,16 @@
             # are files different?
             if n != m2[f]:
                 a = ma.get(f, nullid)
-                # are both different from the ancestor?
-                if n != a and m2[f] != a:
-                    act("versions differ", "m", f, f, f, rflags, False)
                 # is remote's version newer?
-                elif m2[f] != a:
-                    act("remote is newer", "g", f, rflags)
-                # local is newer, not overwrite, check mode bits
-                elif m1.flags(f) != rflags:
-                    act("update permissions", "e", f, rflags)
-            # contents same, check mode bits
-            elif m1.flags(f) != rflags:
+                if m2[f] != a:
+                    # are both different from the ancestor?
+                    if n != a:
+                        act("versions differ", "m", f, f, f, rflags, False)
+                    else:
+                        act("remote is newer", "g", f, rflags)
+                    continue
+            # contents don't need updating, check mode bits
+            if m1.flags(f) != rflags:
                 act("update permissions", "e", f, rflags)
         elif f in copied:
             continue