##// END OF EJS Templates
pathutil: mark parent directories as audited as we go...
Martin von Zweigbergk -
r44656:51c86c61 default
parent child Browse files
Show More
@@ -99,7 +99,6 b' class pathauditor(object):'
99
99
100 parts.pop()
100 parts.pop()
101 normparts.pop()
101 normparts.pop()
102 prefixes = []
103 # It's important that we check the path parts starting from the root.
102 # It's important that we check the path parts starting from the root.
104 # This means we won't accidentally traverse a symlink into some other
103 # This means we won't accidentally traverse a symlink into some other
105 # filesystem (which is potentially expensive to access).
104 # filesystem (which is potentially expensive to access).
@@ -110,13 +109,11 b' class pathauditor(object):'
110 continue
109 continue
111 if self._realfs:
110 if self._realfs:
112 self._checkfs(prefix, path)
111 self._checkfs(prefix, path)
113 prefixes.append(normprefix)
112 if self._cached:
113 self.auditeddir.add(normprefix)
114
114
115 if self._cached:
115 if self._cached:
116 self.audited.add(normpath)
116 self.audited.add(normpath)
117 # only add prefixes to the cache after checking everything: we don't
118 # want to add "foo/bar/baz" before checking if there's a "foo/.hg"
119 self.auditeddir.update(prefixes)
120
117
121 def _checkfs(self, prefix, path):
118 def _checkfs(self, prefix, path):
122 """raise exception if a file system backed check fails"""
119 """raise exception if a file system backed check fails"""
General Comments 0
You need to be logged in to leave comments. Login now