--- a/mercurial/vfs.py Tue Aug 01 21:03:25 2017 +0900
+++ b/mercurial/vfs.py Wed Jul 26 22:10:15 2017 +0900
@@ -295,8 +295,13 @@
This class is used to hide the details of COW semantics and
remote file access from higher level code.
+
+ 'cacheaudited' should be enabled only if (a) vfs object is short-lived, or
+ (b) the base directory is managed by hg and considered sort-of append-only.
+ See pathutil.pathauditor() for details.
'''
- def __init__(self, base, audit=True, expandpath=False, realpath=False):
+ def __init__(self, base, audit=True, cacheaudited=False, expandpath=False,
+ realpath=False):
if expandpath:
base = util.expandpath(base)
if realpath:
@@ -304,7 +309,7 @@
self.base = base
self._audit = audit
if audit:
- self.audit = pathutil.pathauditor(self.base)
+ self.audit = pathutil.pathauditor(self.base, cached=cacheaudited)
else:
self.audit = (lambda path, mode=None: True)
self.createmode = None