mercurial/statichttprepo.py
branchstable
changeset 48796 c00d3ce4e94b
parent 48668 4a9570e389b2
child 48875 6000f5b25c9b
--- a/mercurial/statichttprepo.py	Fri Feb 18 12:55:39 2022 +0100
+++ b/mercurial/statichttprepo.py	Fri Feb 18 14:27:43 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(