Mercurial > public > mercurial-scm > hg
diff 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 |
line wrap: on
line diff
--- a/mercurial/statichttprepo.py Wed Sep 12 15:47:24 2018 -0700 +++ b/mercurial/statichttprepo.py Wed Sep 12 15:03:17 2018 -0700 @@ -176,6 +176,7 @@ supportedrequirements = localrepo.gathersupportedrequirements(ui) localrepo.ensurerequirementsrecognized(requirements, supportedrequirements) + localrepo.ensurerequirementscompatible(ui, requirements) # setup store self.store = store.store(requirements, self.path, vfsclass)