mercurial/scmutil.py
changeset 18624 4db216b1c154
parent 18618 43ffd0279876
child 18626 b114e41c4df3
--- a/mercurial/scmutil.py	Sat Feb 09 22:54:34 2013 +0000
+++ b/mercurial/scmutil.py	Tue Feb 05 14:24:14 2013 -0800
@@ -184,6 +184,13 @@
         # want to add "foo/bar/baz" before checking if there's a "foo/.hg"
         self.auditeddir.update(prefixes)
 
+    def check(self, path):
+        try:
+            self(path)
+            return True
+        except (OSError, util.Abort):
+            return False
+
 class abstractvfs(object):
     """Abstract base class; cannot be instantiated"""
 
@@ -745,11 +752,7 @@
     ctx = repo[None]
     walkresults = repo.dirstate.walk(m, sorted(ctx.substate), True, False)
     for abs in sorted(walkresults):
-        good = True
-        try:
-            audit_path(abs)
-        except (OSError, util.Abort):
-            good = False
+        good = audit_path.check(abs)
 
         st = walkresults[abs]
         dstate = repo.dirstate[abs]