[PATCH] workingctx.remove: don't stat files again after unlinking

Adrian Buehlmann adrian at cadifra.com
Tue May 24 17:08:25 CDT 2011


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1306241543 -7200
# Node ID e62610d85fc8514c512f6411c5f558bf37ce8500
# Parent  17e7ee042dc451fae1363803ce10af8543bffd05
workingctx.remove: don't stat files again after unlinking

we already know at this point that they have been unlinked

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -862,9 +862,7 @@
                         if inst.errno != errno.ENOENT:
                             raise
             for f in list:
-                if unlink and os.path.lexists(self._repo.wjoin(f)):
-                    self._repo.ui.warn(_("%s still exists!\n") % f)
-                elif self._repo.dirstate[f] == 'a':
+                if self._repo.dirstate[f] == 'a':
                     self._repo.dirstate.forget(f)
                 elif f not in self._repo.dirstate:
                     self._repo.ui.warn(_("%s not tracked!\n") % f)


More information about the Mercurial-devel mailing list