[PATCH 2 of 2 in crew-stable] scmutil: add mustaudit delegation to filtervfs (issue3673)
Bryan O'Sullivan
bos at serpentine.com
Mon Oct 22 19:13:12 UTC 2012
# HG changeset patch
# User Bryan O'Sullivan <bryano at fb.com>
# Date 1350932421 25200
# Branch stable
# Node ID f42cf30873dcb3845edfe455cc10e55b988a5186
# Parent 408ded42c5ec43d6f9cbc2eebe2c8a5c46ed4374
scmutil: add mustaudit delegation to filtervfs (issue3673)
diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -360,21 +360,21 @@ class auditvfs(object):
mustaudit = property(_getmustaudit, _setmustaudit)
-class filtervfs(abstractvfs):
+class filtervfs(abstractvfs, auditvfs):
'''Wrapper vfs for filtering filenames with a function.'''
- def __init__(self, opener, filter):
+ def __init__(self, vfs, filter):
+ auditvfs.__init__(self, vfs)
self._filter = filter
- self._orig = opener
def __call__(self, path, *args, **kwargs):
- return self._orig(self._filter(path), *args, **kwargs)
+ return self.vfs(self._filter(path), *args, **kwargs)
def join(self, path):
if path:
- return self._orig.join(self._filter(path))
+ return self.vfs.join(self._filter(path))
else:
- return self._orig.join(path)
+ return self.vfs.join(path)
filteropener = filtervfs
More information about the Mercurial-devel
mailing list