Mercurial > hg-stable
changeset 31158:3eaff87a0a89
localrepo: deprecate 'repo.opener' (API)
The "new" 'repo.vfs' attribute have been around for almost 5 years. I think we
can deprecate the old form now ;-)
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Fri, 05 Aug 2016 13:56:10 +0200 |
parents | e04ab2a5bf90 |
children | 76a64c1e5439 |
files | mercurial/localrepo.py mercurial/statichttprepo.py |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu Mar 02 03:24:58 2017 +0100 +++ b/mercurial/localrepo.py Fri Aug 05 13:56:10 2016 +0200 @@ -267,7 +267,6 @@ self.nofsauditor = pathutil.pathauditor(self.root, self._checknested, realfs=False) self.vfs = scmutil.vfs(self.path) - self.opener = self.vfs self.baseui = baseui self.ui = baseui.copy() self.ui.copy = baseui.copy # prevent copying repo configuration @@ -384,6 +383,11 @@ self.ui.deprecwarn("use 'repo.wvfs' instead of 'repo.wopener'", '4.2') return self.wvfs + @property + def opener(self): + self.ui.deprecwarn("use 'repo.vfs' instead of 'repo.opener'", '4.2') + return self.vfs + def close(self): self._writecaches()
--- a/mercurial/statichttprepo.py Thu Mar 02 03:24:58 2017 +0100 +++ b/mercurial/statichttprepo.py Fri Aug 05 13:56:10 2016 +0200 @@ -123,7 +123,6 @@ vfsclass = build_opener(ui, authinfo) self.vfs = vfsclass(self.path) - self.opener = self.vfs self._phasedefaults = [] self.names = namespaces.namespaces()