scmutil: simplify vfs.audit - drop wrapped vfs.auditor
authorMads Kiilerich <mads@kiilerich.com>
Wed, 09 Jan 2013 00:01:33 +0100
changeset 18327 4aecdb91443c
parent 18326 614f769e6aa7
child 18328 2fee5119099b
scmutil: simplify vfs.audit - drop wrapped vfs.auditor
mercurial/scmutil.py
--- a/mercurial/scmutil.py	Thu Jan 10 00:44:23 2013 +0100
+++ b/mercurial/scmutil.py	Wed Jan 09 00:01:33 2013 +0100
@@ -252,9 +252,9 @@
     def _setmustaudit(self, onoff):
         self._audit = onoff
         if onoff:
-            self.auditor = pathauditor(self.base)
+            self.audit = pathauditor(self.base)
         else:
-            self.auditor = util.always
+            self.audit = util.always
 
     mustaudit = property(_getmustaudit, _setmustaudit)
 
@@ -276,7 +276,7 @@
             r = util.checkosfilename(path)
             if r:
                 raise util.Abort("%s: %r" % (r, path))
-        self.auditor(path)
+        self.audit(path)
         f = self.join(path)
 
         if not text and "b" not in mode:
@@ -321,7 +321,7 @@
         return fp
 
     def symlink(self, src, dst):
-        self.auditor(dst)
+        self.audit(dst)
         linkname = self.join(dst)
         try:
             os.unlink(linkname)
@@ -341,9 +341,6 @@
         else:
             self.write(dst, src)
 
-    def audit(self, path):
-        self.auditor(path)
-
     def join(self, path):
         if path:
             return os.path.join(self.base, path)