mercurial/localrepo.py
changeset 46003 c6a1fa42e325
parent 45942 89a2afe31e82
child 46004 49b4ab1d9f5e
equal deleted inserted replaced
46002:705c37f22859 46003:c6a1fa42e325
   556     # there exists a `.hg/store/requires` too and we should read it
   556     # there exists a `.hg/store/requires` too and we should read it
   557     # NOTE: presence of SHARESAFE_REQUIREMENT imply that store requirement
   557     # NOTE: presence of SHARESAFE_REQUIREMENT imply that store requirement
   558     # is present. We never write SHARESAFE_REQUIREMENT for a repo if store
   558     # is present. We never write SHARESAFE_REQUIREMENT for a repo if store
   559     # is not present, refer checkrequirementscompat() for that
   559     # is not present, refer checkrequirementscompat() for that
   560     if requirementsmod.SHARESAFE_REQUIREMENT in requirements:
   560     if requirementsmod.SHARESAFE_REQUIREMENT in requirements:
       
   561 
       
   562         if (
       
   563             shared
       
   564             and requirementsmod.SHARESAFE_REQUIREMENT
       
   565             not in _readrequires(sharedvfs, True)
       
   566         ):
       
   567             raise error.Abort(
       
   568                 _(b"share source does not support exp-sharesafe requirement")
       
   569             )
       
   570 
   561         if shared:
   571         if shared:
   562             # This is a shared repo
   572             # This is a shared repo
   563             storevfs = vfsmod.vfs(sharedvfs.join(b'store'))
   573             storevfs = vfsmod.vfs(sharedvfs.join(b'store'))
   564         else:
   574         else:
   565             storevfs = vfsmod.vfs(hgvfs.join(b'store'))
   575             storevfs = vfsmod.vfs(hgvfs.join(b'store'))