Patchwork [3,of,3] vfs: rename auditvfs to proxyvfs

login
register
mail settings
Submitter Yuya Nishihara
Date July 7, 2017, 3:14 p.m.
Message ID <a10abcecbd75a060cabe.1499440443@mimosa>
Download mbox | patch
Permalink /patch/22102/
State Accepted
Headers show

Comments

Yuya Nishihara - July 7, 2017, 3:14 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1499438400 -32400
#      Fri Jul 07 23:40:00 2017 +0900
# Node ID a10abcecbd75a060cabea857458b7c921704cb4b
# Parent  4249fe0f2a768bd556bd8e69e1b62baa20594190
vfs: rename auditvfs to proxyvfs

Since we've removed mustaudit property, auditvfs has no auditing business.
It's just a utility class for vfs wrappers.
Sean Farley - July 7, 2017, 6:44 p.m.
Yuya Nishihara <yuya@tcha.org> writes:

> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1499438400 -32400
> #      Fri Jul 07 23:40:00 2017 +0900
> # Node ID a10abcecbd75a060cabea857458b7c921704cb4b
> # Parent  4249fe0f2a768bd556bd8e69e1b62baa20594190
> vfs: rename auditvfs to proxyvfs
>
> Since we've removed mustaudit property, auditvfs has no auditing business.
> It's just a utility class for vfs wrappers.

Looks like a good cleanup to me; queued!

Patch

diff --git a/mercurial/store.py b/mercurial/store.py
--- a/mercurial/store.py
+++ b/mercurial/store.py
@@ -475,9 +475,9 @@  class fncache(object):
             self._load()
         return iter(self.entries)
 
-class _fncachevfs(vfsmod.abstractvfs, vfsmod.auditvfs):
+class _fncachevfs(vfsmod.abstractvfs, vfsmod.proxyvfs):
     def __init__(self, vfs, fnc, encode):
-        vfsmod.auditvfs.__init__(self, vfs)
+        vfsmod.proxyvfs.__init__(self, vfs)
         self.fncache = fnc
         self.encode = encode
 
diff --git a/mercurial/vfs.py b/mercurial/vfs.py
--- a/mercurial/vfs.py
+++ b/mercurial/vfs.py
@@ -441,7 +441,7 @@  class vfs(abstractvfs):
 
 opener = vfs
 
-class auditvfs(object):
+class proxyvfs(object):
     def __init__(self, vfs):
         self.vfs = vfs
 
@@ -453,11 +453,11 @@  class auditvfs(object):
     def options(self, value):
         self.vfs.options = value
 
-class filtervfs(abstractvfs, auditvfs):
+class filtervfs(abstractvfs, proxyvfs):
     '''Wrapper vfs for filtering filenames with a function.'''
 
     def __init__(self, vfs, filter):
-        auditvfs.__init__(self, vfs)
+        proxyvfs.__init__(self, vfs)
         self._filter = filter
 
     def __call__(self, path, *args, **kwargs):
@@ -471,11 +471,11 @@  class filtervfs(abstractvfs, auditvfs):
 
 filteropener = filtervfs
 
-class readonlyvfs(abstractvfs, auditvfs):
+class readonlyvfs(abstractvfs, proxyvfs):
     '''Wrapper vfs preventing any writing.'''
 
     def __init__(self, vfs):
-        auditvfs.__init__(self, vfs)
+        proxyvfs.__init__(self, vfs)
 
     def __call__(self, path, mode='r', *args, **kw):
         if mode not in ('r', 'rb'):