diff mercurial/context.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 c4c5e3802e9c
children 5f6090e559fa
line wrap: on
line diff
--- a/mercurial/context.py	Thu May 26 10:46:34 2011 +0200
+++ b/mercurial/context.py	Thu May 26 17:15:35 2011 -0500
@@ -842,7 +842,7 @@
                 if self._repo.dirstate[f] != 'a':
                     self._repo.ui.warn(_("%s not added!\n") % f)
                 else:
-                    self._repo.dirstate.forget(f)
+                    self._repo.dirstate.drop(f)
         finally:
             wlock.release()
 
@@ -863,7 +863,7 @@
                             raise
             for f in list:
                 if self._repo.dirstate[f] == 'a':
-                    self._repo.dirstate.forget(f)
+                    self._repo.dirstate.drop(f)
                 elif f not in self._repo.dirstate:
                     self._repo.ui.warn(_("%s not tracked!\n") % f)
                 else: