# HG changeset patch # User Pierre-Yves David # Date 2016-08-05 11:56:10 # Node ID 3eaff87a0a89ce176b072d5a50ab9fa07eec32d2 # Parent e04ab2a5bf901e235f103c418ef6457ee527fc37 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 ;-) diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -267,7 +267,6 @@ class localrepository(object): 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 @@ class localrepository(object): 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() diff --git a/mercurial/statichttprepo.py b/mercurial/statichttprepo.py --- a/mercurial/statichttprepo.py +++ b/mercurial/statichttprepo.py @@ -123,7 +123,6 @@ class statichttprepository(localrepo.loc vfsclass = build_opener(ui, authinfo) self.vfs = vfsclass(self.path) - self.opener = self.vfs self._phasedefaults = [] self.names = namespaces.namespaces()