diff -r fc61495ea9cf -r 30847b8af7ca mercurial/cmdutil.py --- 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: