scmutil: turn opener._audit into a property, mustaudit
This will be used by an upcoming patch.
--- 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):