# HG changeset patch # User Alexis S. L. Carvalho # Date 1181772958 10800 # Node ID 97111071d26cba4b30134670c9e480f6c0df774e # Parent 6a8e1dd18ba28e3fffd475c929e07b5ceb441ed5 addremove: use util.lexists diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- 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: