diff mercurial/scmutil.py @ 17845:408ded42c5ec stable

scmutil: abstract out mustaudit delegation
author Bryan O'Sullivan <bryano@fb.com>
date Mon, 22 Oct 2012 11:59:11 -0700
parents 361ab1e2086f
children f42cf30873dc
line wrap: on
line diff
--- 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.'''