[PATCH 4 of 5] statichttp: use 'repo.vfs' as the main attribute
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Wed Mar 1 21:58:44 EST 2017
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1488421498 -3600
# Thu Mar 02 03:24:58 2017 +0100
# Node ID 437a39859c33901ea29cd22341d93be752e4acc0
# Parent dc2ae1022304ad29959c52e1f549bb05472e9f43
# EXP-Topic vfs.cleanup
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
More information about the Mercurial-devel
mailing list