Patchwork [07,of,14] vfs: drop the 'mustaudit' API

login
register
mail settings
Submitter Pierre-Yves David
Date July 2, 2017, 2:56 a.m.
Message ID <aa8fda090eeee63cfc24.1498964192@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21888/
State Accepted
Headers show

Comments

Pierre-Yves David - July 2, 2017, 2:56 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1498962402 -7200
#      Sun Jul 02 04:26:42 2017 +0200
# Node ID aa8fda090eeee63cfc24d4a125d69f275abac1dd
# Parent  d368c4c29fea996e537e4abf319d59d6d0362829
# EXP-Topic vfs.ward
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r aa8fda090eee
vfs: drop the 'mustaudit' API

There are no remaining users of 'mustaudit' so we can safely drop the API.
External user are unlikely from a quick research so no deprecation is added.
Yuya Nishihara - July 5, 2017, 2:34 p.m.
On Sun, 02 Jul 2017 04:56:32 +0200, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@octobus.net>
> # Date 1498962402 -7200
> #      Sun Jul 02 04:26:42 2017 +0200
> # Node ID aa8fda090eeee63cfc24d4a125d69f275abac1dd
> # Parent  d368c4c29fea996e537e4abf319d59d6d0362829
> # EXP-Topic vfs.ward
> # Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
> #              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r aa8fda090eee
> vfs: drop the 'mustaudit' API

Queued up to here per Sean's review, thanks. These look nice refactoring.

Patch

diff --git a/mercurial/vfs.py b/mercurial/vfs.py
--- a/mercurial/vfs.py
+++ b/mercurial/vfs.py
@@ -290,21 +290,13 @@  class vfs(abstractvfs):
         if realpath:
             base = os.path.realpath(base)
         self.base = base
-        self.mustaudit = audit
-        self.createmode = None
-        self._trustnlink = None
-
-    @property
-    def mustaudit(self):
-        return self._audit
-
-    @mustaudit.setter
-    def mustaudit(self, onoff):
-        self._audit = onoff
-        if onoff:
+        self._audit = audit
+        if audit:
             self.audit = pathutil.pathauditor(self.base)
         else:
             self.audit = util.always
+        self.createmode = None
+        self._trustnlink = None
 
     @util.propertycache
     def _cansymlink(self):
@@ -436,14 +428,6 @@  class auditvfs(object):
         self.vfs = vfs
 
     @property
-    def mustaudit(self):
-        return self.vfs.mustaudit
-
-    @mustaudit.setter
-    def mustaudit(self, onoff):
-        self.vfs.mustaudit = onoff
-
-    @property
     def options(self):
         return self.vfs.options