changeset 7768:5bf5fd1e2a74

merge: mark kept local files as readded on linear update (issue539)
author Matt Mackall <mpm@selenic.com>
date Sun, 15 Feb 2009 10:50:48 -0600
parents b2410ed2cbe9
children 8c06d4bf2c23
files mercurial/merge.py tests/test-rename-merge2.out
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Mon Feb 09 07:55:42 2009 -0600
+++ b/mercurial/merge.py	Sun Feb 15 10:50:48 2009 -0600
@@ -220,6 +220,7 @@
                       "use (c)hanged version or (d)elete?") % f,
                     _("[cd]"), _("c")) == _("d"):
                     act("prompt delete", "r", f)
+                act("prompt keep", "a", f)
             else:
                 act("other deleted", "r", f)
         else:
@@ -367,6 +368,9 @@
                 repo.dirstate.remove(f)
             else:
                 repo.dirstate.forget(f)
+        elif m == "a": # re-add
+            if not branchmerge:
+                repo.dirstate.add(f)
         elif m == "f": # forget
             repo.dirstate.forget(f)
         elif m == "e": # exec change
--- a/tests/test-rename-merge2.out	Mon Feb 09 07:55:42 2009 -0600
+++ b/tests/test-rename-merge2.out	Sun Feb 15 10:50:48 2009 -0600
@@ -484,6 +484,7 @@
   searching for copies back to rev 1
  local changed a which remote deleted
 use (c)hanged version or (d)elete? c
+ a: prompt keep -> a
  b: versions differ -> m
  rev: versions differ -> m
 preserving b for resolve of b