mercurial/localrepo.py
changeset 46003 c6a1fa42e325
parent 45942 89a2afe31e82
child 46004 49b4ab1d9f5e
--- a/mercurial/localrepo.py	Thu Jun 25 13:13:21 2020 +0530
+++ b/mercurial/localrepo.py	Fri Oct 16 18:57:55 2020 +0530
@@ -558,6 +558,16 @@
     # is present. We never write SHARESAFE_REQUIREMENT for a repo if store
     # is not present, refer checkrequirementscompat() for that
     if requirementsmod.SHARESAFE_REQUIREMENT in requirements:
+
+        if (
+            shared
+            and requirementsmod.SHARESAFE_REQUIREMENT
+            not in _readrequires(sharedvfs, True)
+        ):
+            raise error.Abort(
+                _(b"share source does not support exp-sharesafe requirement")
+            )
+
         if shared:
             # This is a shared repo
             storevfs = vfsmod.vfs(sharedvfs.join(b'store'))