--- a/mercurial/pathutil.py Mon Jan 27 09:14:19 2020 -0800
+++ b/mercurial/pathutil.py Fri Jan 24 17:25:40 2020 -0800
@@ -99,7 +99,6 @@
parts.pop()
normparts.pop()
- prefixes = []
# It's important that we check the path parts starting from the root.
# This means we won't accidentally traverse a symlink into some other
# filesystem (which is potentially expensive to access).
@@ -110,13 +109,11 @@
continue
if self._realfs:
self._checkfs(prefix, path)
- prefixes.append(normprefix)
+ if self._cached:
+ self.auditeddir.add(normprefix)
if self._cached:
self.audited.add(normpath)
- # only add prefixes to the cache after checking everything: we don't
- # want to add "foo/bar/baz" before checking if there's a "foo/.hg"
- self.auditeddir.update(prefixes)
def _checkfs(self, prefix, path):
"""raise exception if a file system backed check fails"""