Patchwork [02,of,14] scmutil: simplify vfs.audit - drop wrapped vfs.auditor

login
register
mail settings
Submitter Mads Kiilerich
Date Jan. 13, 2013, 7:02 p.m.
Message ID <0b18eac3ef2b52ce2192.1358103757@localhost6.localdomain6>
Download mbox | patch
Permalink /patch/577/
State Accepted
Commit 4aecdb91443c93cd7748a115261d5b6e1955d5fa
Headers show

Comments

Mads Kiilerich - Jan. 13, 2013, 7:02 p.m.
# HG changeset patch
# User Mads Kiilerich <mads@kiilerich.com>
# Date 1357686093 -3600
# Node ID 0b18eac3ef2b52ce21928ad2ec95c76dbb917c2b
# Parent  8946e9d56444bd7b666151dda753562c756b3ab0
scmutil: simplify vfs.audit - drop wrapped vfs.auditor

Patch

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -252,9 +252,9 @@  class vfs(abstractvfs):
     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 @@  class vfs(abstractvfs):
             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 @@  class vfs(abstractvfs):
         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 @@  class vfs(abstractvfs):
         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)