statichttp: use 'repo.vfs' as the main attribute
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Thu, 02 Mar 2017 03:24:58 +0100
changeset 31147 e04ab2a5bf90
parent 31146 16d8bec0177d
child 31148 3eaff87a0a89
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.
mercurial/statichttprepo.py
--- a/mercurial/statichttprepo.py	Thu Mar 02 03:23:18 2017 +0100
+++ b/mercurial/statichttprepo.py	Thu Mar 02 03:24:58 2017 +0100
@@ -121,9 +121,9 @@
         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 @@
                 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