mercurial/cmdutil.py
changeset 4522 591322269fed
parent 4478 b2b55acbacdd
child 4525 78b6add1f966
--- a/mercurial/cmdutil.py	Thu Jun 07 23:16:10 2007 +0200
+++ b/mercurial/cmdutil.py	Fri Jun 08 23:49:12 2007 -0300
@@ -186,13 +186,15 @@
     add, remove = [], []
     mapping = {}
     for src, abs, rel, exact in walk(repo, pats, opts):
+        target = repo.wjoin(abs)
         if src == 'f' and repo.dirstate.state(abs) == '?':
             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))
-        islink = os.path.islink(rel)
-        if repo.dirstate.state(abs) != 'r' and not islink and not os.path.exists(rel):
+        islink = os.path.islink(target)
+        if (repo.dirstate.state(abs) != 'r' and not islink
+            and not os.path.exists(target)):
             remove.append(abs)
             mapping[abs] = rel, exact
             if repo.ui.verbose or not exact: