diff hgext/mq.py @ 14434:cc8c09855d19

dirstate: rename forget to drop It has substantially different semantics from forget at the command layer, so change it to avoid confusion. We can't simply combine it with remove because we need to explicitly drop non-added files in some cases like commit.
author Matt Mackall <mpm@selenic.com>
date Thu, 26 May 2011 17:15:35 -0500
parents 4eb88d296f63
children 5f6090e559fa
line wrap: on
line diff
--- a/hgext/mq.py	Thu May 26 10:46:34 2011 +0200
+++ b/hgext/mq.py	Thu May 26 17:15:35 2011 -0500
@@ -1302,7 +1302,7 @@
                     except OSError, e:
                         if e.errno != errno.ENOENT:
                             raise
-                    repo.dirstate.forget(f)
+                    repo.dirstate.drop(f)
                 for f in m + r:
                     fctx = ctx[f]
                     repo.wwrite(f, fctx.data(), fctx.flags())
@@ -1480,7 +1480,7 @@
                 for f in mm:
                     repo.dirstate.normallookup(f)
                 for f in forget:
-                    repo.dirstate.forget(f)
+                    repo.dirstate.drop(f)
 
                 if not msg:
                     if not ph.message:
@@ -2617,7 +2617,7 @@
         wlock = r.wlock()
         try:
             if r.dirstate[patch] == 'a':
-                r.dirstate.forget(patch)
+                r.dirstate.drop(patch)
                 r.dirstate.add(name)
             else:
                 if r.dirstate[name] == 'r':