# HG changeset patch # User Boris Feld # Date 2019-01-02 09:29:12 # Node ID 6498f0e03526af31cbfce6ceb87d17c58c4ce12f # Parent 9e593db5f1a1b08f812591439c831ace55bca321 vfs: fix proxyvfs inheritance The proxyvfs class is designed to overwrite some of the vfs logic. Yet, it did not use normal class inheritance. This is becoming an issue as `abstractvfs` method could take precedence over their `proxyvfs` version. We fix the inheritance chain to be as expected. diff --git a/mercurial/store.py b/mercurial/store.py --- a/mercurial/store.py +++ b/mercurial/store.py @@ -523,7 +523,7 @@ class fncache(object): self._load() return iter(self.entries | self.addls) -class _fncachevfs(vfsmod.abstractvfs, vfsmod.proxyvfs): +class _fncachevfs(vfsmod.proxyvfs): def __init__(self, vfs, fnc, encode): vfsmod.proxyvfs.__init__(self, vfs) self.fncache = fnc diff --git a/mercurial/vfs.py b/mercurial/vfs.py --- a/mercurial/vfs.py +++ b/mercurial/vfs.py @@ -469,7 +469,7 @@ class vfs(abstractvfs): opener = vfs -class proxyvfs(object): +class proxyvfs(abstractvfs): def __init__(self, vfs): self.vfs = vfs @@ -481,7 +481,7 @@ class proxyvfs(object): def options(self, value): self.vfs.options = value -class filtervfs(abstractvfs, proxyvfs): +class filtervfs(proxyvfs, abstractvfs): '''Wrapper vfs for filtering filenames with a function.''' def __init__(self, vfs, filter): @@ -499,7 +499,7 @@ class filtervfs(abstractvfs, proxyvfs): filteropener = filtervfs -class readonlyvfs(abstractvfs, proxyvfs): +class readonlyvfs(proxyvfs): '''Wrapper vfs preventing any writing.''' def __init__(self, vfs):