changeset 4149:e59286f15189

Use "f in dirstate" instead of "dirstate.state(f) == '?'"
author Emanuele Aina <faina.mail@tiscali.it>
date Tue, 06 Mar 2007 17:45:43 -0300
parents de85ff0aaac5
children cf26f4564000
files contrib/purge/purge.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/purge/purge.py	Tue Mar 06 17:45:41 2007 -0300
+++ b/contrib/purge/purge.py	Tue Mar 06 17:45:43 2007 -0300
@@ -61,9 +61,7 @@
             self._ui.warn(_('warning: %s\n') % msg)
 
     def _remove_file(self, name):
-        # dirstate.state() requires a path relative to the root
-        # directory.
-        if self._repo.dirstate.state(name) != '?':
+        if name in self._repo.dirstate:
             return
         self._ui.note(_('Removing file %s\n') % name)
         if self._act: