Mercurial > hg
comparison mercurial/statichttprepo.py @ 39698:f44187605315
localrepo: move store() from store module
I want logic related to requirements handling to be in the localrepo
module so it is all in one place.
I would have loved to inline this logic. Unfortunately, statichttprepo
also calls it. I didn't want to inline it twice. We could potentially
refactor statichttppeer. But meh.
Differential Revision: https://phab.mercurial-scm.org/D4574
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 12 Sep 2018 15:07:27 -0700 |
parents | cb2dcfa5cade |
children | 5ccd791344f3 |
comparison
equal
deleted
inserted
replaced
39697:98ca9078807a | 39698:f44187605315 |
---|---|
17 error, | 17 error, |
18 localrepo, | 18 localrepo, |
19 manifest, | 19 manifest, |
20 namespaces, | 20 namespaces, |
21 pathutil, | 21 pathutil, |
22 store, | |
23 url, | 22 url, |
24 util, | 23 util, |
25 vfs as vfsmod, | 24 vfs as vfsmod, |
26 ) | 25 ) |
27 | 26 |
177 localrepo.ensurerequirementsrecognized(requirements, | 176 localrepo.ensurerequirementsrecognized(requirements, |
178 supportedrequirements) | 177 supportedrequirements) |
179 localrepo.ensurerequirementscompatible(ui, requirements) | 178 localrepo.ensurerequirementscompatible(ui, requirements) |
180 | 179 |
181 # setup store | 180 # setup store |
182 self.store = store.store(requirements, self.path, vfsclass) | 181 self.store = localrepo.makestore(requirements, self.path, vfsclass) |
183 self.spath = self.store.path | 182 self.spath = self.store.path |
184 self.svfs = self.store.opener | 183 self.svfs = self.store.opener |
185 self.sjoin = self.store.join | 184 self.sjoin = self.store.join |
186 self._filecache = {} | 185 self._filecache = {} |
187 self.requirements = requirements | 186 self.requirements = requirements |