Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dirstate.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 | 38af0f514134 |
children | 774da7121fc9 |
line wrap: on
line diff
--- a/mercurial/dirstate.py Thu May 26 10:46:34 2011 +0200 +++ b/mercurial/dirstate.py Thu May 26 17:15:35 2011 -0500 @@ -365,14 +365,11 @@ if f in self._copymap: del self._copymap[f] - def forget(self, f): - '''Forget a file.''' + def drop(self, f): + '''Drop a file from the dirstate''' self._dirty = True - try: - self._droppath(f) - del self._map[f] - except KeyError: - self._ui.warn(_("not in dirstate: %s\n") % f) + self._droppath(f) + del self._map[f] def _normalize(self, path, isknown): normed = os.path.normcase(path)