Mercurial > hg
changeset 48668:4a9570e389b2
share-safe: add support for static-http repository
We need to read the second requirements file in the static-http case too. Otherwise, static-http would miss most of the requirements and misbehave.
Differential Revision: https://phab.mercurial-scm.org/D11996
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 11 Jan 2022 09:56:03 +0100 |
parents | fc80752dbb24 |
children | 7ee07e1a25c0 |
files | mercurial/statichttprepo.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/statichttprepo.py Tue Jan 11 09:36:10 2022 +0100 +++ b/mercurial/statichttprepo.py Tue Jan 11 09:56:03 2022 +0100 @@ -22,6 +22,7 @@ namespaces, pathutil, pycompat, + requirements as requirementsmod, url, util, vfs as vfsmod, @@ -197,6 +198,9 @@ # we do not care about empty old-style repositories here msg = _(b"'%s' does not appear to be an hg repository") % path raise error.RepoError(msg) + if requirementsmod.SHARESAFE_REQUIREMENT in requirements: + storevfs = vfsclass(self.vfs.join(b'store')) + requirements |= set(storevfs.read(b'requires').splitlines()) supportedrequirements = localrepo.gathersupportedrequirements(ui) localrepo.ensurerequirementsrecognized(