# HG changeset patch # User Pierre-Yves David # Date 2017-03-02 02:24:58 # Node ID e04ab2a5bf901e235f103c418ef6457ee527fc37 # Parent 16d8bec0177d9402ff0f015ec054ec21238fd9fb statichttp: use 'repo.vfs' as the main attribute We are about to deprecate the repo.opener attribute, we prepare the static http code to be ready for this change. diff --git a/mercurial/statichttprepo.py b/mercurial/statichttprepo.py --- a/mercurial/statichttprepo.py +++ b/mercurial/statichttprepo.py @@ -121,9 +121,9 @@ class statichttprepository(localrepo.loc u = util.url(path.rstrip('/') + "/.hg") self.path, authinfo = u.authinfo() - opener = build_opener(ui, authinfo) - self.opener = opener(self.path) - self.vfs = self.opener + vfsclass = build_opener(ui, authinfo) + self.vfs = vfsclass(self.path) + self.opener = self.vfs self._phasedefaults = [] self.names = namespaces.namespaces() @@ -148,7 +148,7 @@ class statichttprepository(localrepo.loc raise error.RepoError(msg) # setup store - self.store = store.store(requirements, self.path, opener) + self.store = store.store(requirements, self.path, vfsclass) self.spath = self.store.path self.svfs = self.store.opener self.sjoin = self.store.join