changeset 17554:5450c8ad9d98

scmutil: turn opener._audit into a property, mustaudit This will be used by an upcoming patch.
author Bryan O'Sullivan <bryano@fb.com>
date Fri, 14 Sep 2012 12:04:35 -0700
parents 5ab863922e0f
children 57eba8158736
files mercurial/scmutil.py
diffstat 1 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/scmutil.py	Fri Sep 14 13:02:31 2012 +0200
+++ b/mercurial/scmutil.py	Fri Sep 14 12:04:35 2012 -0700
@@ -229,13 +229,21 @@
         if expand:
             base = os.path.realpath(util.expandpath(base))
         self.base = base
-        self._audit = audit
-        if audit:
-            self.auditor = pathauditor(base)
+        self._setmustaudit(audit)
+        self.createmode = None
+        self._trustnlink = None
+
+    def _getmustaudit(self):
+        return self._audit
+
+    def _setmustaudit(self, onoff):
+        self._audit = onoff
+        if onoff:
+            self.auditor = pathauditor(self.base)
         else:
             self.auditor = util.always
-        self.createmode = None
-        self._trustnlink = None
+
+    mustaudit = property(_getmustaudit, _setmustaudit)
 
     @util.propertycache
     def _cansymlink(self):