--- a/mercurial/scmutil.py Fri Oct 19 14:47:55 2012 -0500
+++ b/mercurial/scmutil.py Mon Oct 22 11:59:11 2012 -0700
@@ -348,6 +348,18 @@
opener = vfs
+class auditvfs(object):
+ def __init__(self, vfs):
+ self.vfs = vfs
+
+ def _getmustaudit(self):
+ return self.vfs.mustaudit
+
+ def _setmustaudit(self, onoff):
+ self.vfs.mustaudit = onoff
+
+ mustaudit = property(_getmustaudit, _setmustaudit)
+
class filtervfs(abstractvfs):
'''Wrapper vfs for filtering filenames with a function.'''
--- a/mercurial/store.py Fri Oct 19 14:47:55 2012 -0500
+++ b/mercurial/store.py Mon Oct 22 11:59:11 2012 -0700
@@ -436,20 +436,12 @@
self._load()
return iter(self.entries)
-class _fncachevfs(scmutil.abstractvfs):
+class _fncachevfs(scmutil.abstractvfs, scmutil.auditvfs):
def __init__(self, vfs, fnc, encode):
- self.vfs = vfs
+ scmutil.auditvfs.__init__(self, vfs)
self.fncache = fnc
self.encode = encode
- def _getmustaudit(self):
- return self.vfs.mustaudit
-
- def _setmustaudit(self, onoff):
- self.vfs.mustaudit = onoff
-
- mustaudit = property(_getmustaudit, _setmustaudit)
-
def __call__(self, path, mode='r', *args, **kw):
if mode not in ('r', 'rb') and path.startswith('data/'):
self.fncache.add(path)