changeset 3102:22336ad45cf2

merge: add forget to action list
author Matt Mackall <mpm@selenic.com>
date Sun, 17 Sep 2006 15:54:51 -0500
parents 36b08cd92fb7
children e6818b0b8154
files mercurial/merge.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Sun Sep 17 15:24:00 2006 -0500
+++ b/mercurial/merge.py	Sun Sep 17 15:54:51 2006 -0500
@@ -108,7 +108,6 @@
                   (short(p1), short(p2), short(pa)))
 
     action = []
-    forget = []
 
     # update m1 from working dir
     umap = dict.fromkeys(unknown)
@@ -127,7 +126,7 @@
         # prevent the dirstate from listing the file when it is no
         # longer in the manifest.
         if linear_path and f not in m2:
-            forget.append(f)
+            action.append((f, "f"))
 
     if partial:
         for f in m1.keys():
@@ -268,7 +267,6 @@
     # update dirstate
     if not partial:
         repo.dirstate.setparents(p1, p2)
-        repo.dirstate.forget(forget)
         for a in action:
             f, m = a[:2]
             if m == "r": # remove
@@ -276,6 +274,8 @@
                     repo.dirstate.update([f], 'r')
                 else:
                     repo.dirstate.forget([f])
+            elif m == "f": # forget
+                repo.dirstate.forget([f])
             elif m == "g": # get
                 if branchmerge:
                     repo.dirstate.update([f], 'n', st_mtime=-1)