mercurial/cmdutil.py
changeset 4906 30847b8af7ca
parent 4836 0e2d0a78f81a
child 4917 126f527b3ba3
--- a/mercurial/cmdutil.py	Sat Jul 21 16:02:09 2007 -0500
+++ b/mercurial/cmdutil.py	Sat Jul 21 16:02:09 2007 -0500
@@ -638,12 +638,12 @@
     mapping = {}
     for src, abs, rel, exact in walk(repo, pats, opts):
         target = repo.wjoin(abs)
-        if src == 'f' and repo.dirstate.state(abs) == '?':
+        if src == 'f' and abs not in repo.dirstate:
             add.append(abs)
             mapping[abs] = rel, exact
             if repo.ui.verbose or not exact:
                 repo.ui.status(_('adding %s\n') % ((pats and rel) or abs))
-        if repo.dirstate.state(abs) != 'r' and not util.lexists(target):
+        if repo.dirstate[abs] != 'r' and not util.lexists(target):
             remove.append(abs)
             mapping[abs] = rel, exact
             if repo.ui.verbose or not exact: