##// END OF EJS Templates
share: show warning if share is outdated while source supports share-safe...
Pulkit Goyal -
r46619:49b4ab1d default
parent child Browse files
Show More
@@ -557,6 +557,11 b' def makelocalrepository(baseui, path, in'
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 #
561 # However, if SHARESAFE_REQUIREMENT is not present, it means that the
562 # repository was shared the old way. We check the share source .hg/requires
563 # for SHARESAFE_REQUIREMENT to detect whether the current repository needs
564 # to be reshared
560 if requirementsmod.SHARESAFE_REQUIREMENT in requirements:
565 if requirementsmod.SHARESAFE_REQUIREMENT in requirements:
561
566
562 if (
567 if (
@@ -575,6 +580,15 b' def makelocalrepository(baseui, path, in'
575 storevfs = vfsmod.vfs(hgvfs.join(b'store'))
580 storevfs = vfsmod.vfs(hgvfs.join(b'store'))
576
581
577 requirements |= _readrequires(storevfs, False)
582 requirements |= _readrequires(storevfs, False)
583 elif shared:
584 sourcerequires = _readrequires(sharedvfs, False)
585 if requirementsmod.SHARESAFE_REQUIREMENT in sourcerequires:
586 ui.warn(
587 _(
588 b'warning: source repository supports share-safe functionality.'
589 b' Reshare to upgrade.\n'
590 )
591 )
578
592
579 # The .hg/hgrc file may load extensions or contain config options
593 # The .hg/hgrc file may load extensions or contain config options
580 # that influence repository construction. Attempt to load it and
594 # that influence repository construction. Attempt to load it and
@@ -373,6 +373,7 b' Upgrade'
373 Make sure existing shares still works
373 Make sure existing shares still works
374
374
375 $ hg log -GT "{node}: {desc}\n" -R ../nss-share
375 $ hg log -GT "{node}: {desc}\n" -R ../nss-share
376 warning: source repository supports share-safe functionality. Reshare to upgrade.
376 @ f63db81e6dde1d9c78814167f77fb1fb49283f4f: added bar
377 @ f63db81e6dde1d9c78814167f77fb1fb49283f4f: added bar
377 |
378 |
378 o f3ba8b99bb6f897c87bbc1c07b75c6ddf43a4f77: added foo
379 o f3ba8b99bb6f897c87bbc1c07b75c6ddf43a4f77: added foo
General Comments 0
You need to be logged in to leave comments. Login now