changeset 4571:97111071d26c

addremove: use util.lexists
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Wed, 13 Jun 2007 19:15:58 -0300
parents 6a8e1dd18ba2
children 339b8aeee8c5
files mercurial/cmdutil.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -574,9 +574,7 @@ def addremove(repo, pats=[], opts={}, wl
             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(target)
-        if (repo.dirstate.state(abs) != 'r' and not islink
-            and not os.path.exists(target)):
+        if repo.dirstate.state(abs) != 'r' and not util.lexists(target):
             remove.append(abs)
             mapping[abs] = rel, exact
             if repo.ui.verbose or not exact: