Comments
Patch
@@ -284,17 +284,13 @@ class vfs(abstractvfs):
This class is used to hide the details of COW semantics and
remote file access from higher level code.
'''
- def __init__(self, base, audit=True, expandpath=False, realpath=False):
+ def __init__(self, base, expandpath=False, realpath=False):
if expandpath:
base = util.expandpath(base)
if realpath:
base = os.path.realpath(base)
self.base = base
- self._audit = audit
- if audit:
- self.audit = pathutil.pathauditor(self.base)
- else:
- self.audit = util.always
+ self.audit = pathutil.pathauditor(self.base)
self.createmode = None
self._trustnlink = None
@@ -338,10 +334,9 @@ class vfs(abstractvfs):
guarded by any lock (e.g. repo.lock or repo.wlock).
'''
if auditpath:
- if self._audit:
- r = util.checkosfilename(path)
- if r:
- raise error.Abort("%s: %r" % (r, path))
+ r = util.checkosfilename(path)
+ if r:
+ raise error.Abort("%s: %r" % (r, path))
self.audit(path)
f = self.join(path)