diff --git a/mercurial/statichttprepo.py b/mercurial/statichttprepo.py --- a/mercurial/statichttprepo.py +++ b/mercurial/statichttprepo.py @@ -54,14 +54,10 @@ class statichttprepository(localrepo.loc raise repo.RepoError(_("requirement '%s' not supported") % r) # setup store - if "store" in requirements: - self.spath = self.path + "/store" - else: - self.spath = self.path - self.encodefn = store.encodefn(requirements) - so = opener(self.spath) - self.sopener = lambda path, *args, **kw: so( - self.encodefn(path), *args, **kw) + self.store = store.store(requirements, self.path, opener) + self.spath = self.store.path + self.sopener = self.store.opener + self.sjoin = self.store.join self.manifest = manifest.manifest(self.sopener) self.changelog = changelog.changelog(self.sopener) diff --git a/mercurial/store.py b/mercurial/store.py --- a/mercurial/store.py +++ b/mercurial/store.py @@ -119,12 +119,6 @@ class encodedstore(_store): def join(self, f): return os.path.join(self.path, self.encodefn(f)) -def encodefn(requirements): - if 'store' not in requirements: - return lambda x: x - else: - return encodefilename - def store(requirements, path, opener): if 'store' not in requirements: return directstore(path, opener)