remove: use vfs instead of os.path + match.rel() for filesystem checks
authorMatt Harbison <matt_harbison@yahoo.com>
Thu, 25 Dec 2014 21:50:35 -0500
changeset 23674 6e36b9fc7869
parent 23673 69cd91d04117
child 23675 96529f81e2e9
remove: use vfs instead of os.path + match.rel() for filesystem checks
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Thu Dec 25 21:43:45 2014 -0500
+++ b/mercurial/cmdutil.py	Thu Dec 25 21:50:35 2014 -0500
@@ -2092,8 +2092,8 @@
         if f in repo.dirstate or f in wctx.dirs() or f == '.' or insubrepo():
             continue
 
-        if os.path.exists(m.rel(join(f))):
-            if os.path.isdir(m.rel(join(f))):
+        if repo.wvfs.exists(f):
+            if repo.wvfs.isdir(f):
                 ui.warn(_('not removing %s: no tracked files\n')
                         % m.rel(join(f)))
             else: