Mercurial > hg
comparison mercurial/statichttprepo.py @ 39695:cb2dcfa5cade
localrepo: move requirements reasonability testing to own function
Just because we know how to handle each listed requirement doesn't
mean that set of requirements is reasonable.
This commit introduces an extension-wrappable function to validate
that a set of requirements makes sense.
We could combine this with ensurerequirementsrecognized(). But I think
having a line between basic membership testing and compatibility
checking is more powerful as it will help differentiate between
missing support and buggy behavior.
Differential Revision: https://phab.mercurial-scm.org/D4571
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 12 Sep 2018 15:03:17 -0700 |
parents | 6192980553b4 |
children | f44187605315 |
comparison
equal
deleted
inserted
replaced
39694:6192980553b4 | 39695:cb2dcfa5cade |
---|---|
174 raise error.RepoError(msg) | 174 raise error.RepoError(msg) |
175 | 175 |
176 supportedrequirements = localrepo.gathersupportedrequirements(ui) | 176 supportedrequirements = localrepo.gathersupportedrequirements(ui) |
177 localrepo.ensurerequirementsrecognized(requirements, | 177 localrepo.ensurerequirementsrecognized(requirements, |
178 supportedrequirements) | 178 supportedrequirements) |
179 localrepo.ensurerequirementscompatible(ui, requirements) | |
179 | 180 |
180 # setup store | 181 # setup store |
181 self.store = store.store(requirements, self.path, vfsclass) | 182 self.store = store.store(requirements, self.path, vfsclass) |
182 self.spath = self.store.path | 183 self.spath = self.store.path |
183 self.svfs = self.store.opener | 184 self.svfs = self.store.opener |