mercurial/merge.py
changeset 21082 0d67fccc0d43
parent 21081 ffd7b6ce46ff
child 21128 f4014f646f71
--- a/mercurial/merge.py	Sun Apr 06 13:39:51 2014 +0200
+++ b/mercurial/merge.py	Mon Apr 07 02:12:28 2014 +0200
@@ -449,7 +449,7 @@
             fla = ma.flags(fa)
             nol = 'l' not in fl1 + fl2 + fla
             if n2 == a and fl2 == fla:
-                pass # remote unchanged - keep local
+                actions.append((f, "k", (), "keep")) # remote unchanged
             elif n1 == a and fl1 == fla: # local unchanged - use remote
                 if n1 == n2: # optimization: keep local content
                     actions.append((f, "e", (fl2,), "update permissions"))
@@ -634,13 +634,13 @@
             audit(f)
             util.unlinkpath(repo.wjoin(f))
 
-    numupdates = len(actions)
+    numupdates = len([a for a in actions if a[1] != 'k'])
     workeractions = [a for a in actions if a[1] in 'gr']
     updateactions = [a for a in workeractions if a[1] == 'g']
     updated = len(updateactions)
     removeactions = [a for a in workeractions if a[1] == 'r']
     removed = len(removeactions)
-    actions = [a for a in actions if a[1] not in 'gr']
+    actions = [a for a in actions if a[1] not in 'grk']
 
     hgsub = [a[1] for a in workeractions if a[0] == '.hgsubstate']
     if hgsub and hgsub[0] == 'r':
@@ -778,6 +778,8 @@
             repo.dirstate.drop(f)
         elif m == "e": # exec change
             repo.dirstate.normallookup(f)
+        elif m == "k": # keep
+            pass
         elif m == "g": # get
             if branchmerge:
                 repo.dirstate.otherparent(f)