580 |
580 |
581 requirements |= _readrequires(storevfs, False) |
581 requirements |= _readrequires(storevfs, False) |
582 elif shared: |
582 elif shared: |
583 sourcerequires = _readrequires(sharedvfs, False) |
583 sourcerequires = _readrequires(sharedvfs, False) |
584 if requirementsmod.SHARESAFE_REQUIREMENT in sourcerequires: |
584 if requirementsmod.SHARESAFE_REQUIREMENT in sourcerequires: |
585 ui.warn( |
585 if ui.configbool(b'experimental', b'sharesafe-auto-upgrade-shares'): |
586 _( |
586 # prevent cyclic import localrepo -> upgrade -> localrepo |
587 b'warning: source repository supports share-safe functionality.' |
587 from . import upgrade |
588 b' Reshare to upgrade.\n' |
588 |
|
589 upgrade.upgrade_share_to_safe( |
|
590 ui, |
|
591 hgvfs, |
|
592 storevfs, |
|
593 requirements, |
589 ) |
594 ) |
590 ) |
595 else: |
|
596 ui.warn( |
|
597 _( |
|
598 b'warning: source repository supports share-safe functionality.' |
|
599 b' Reshare to upgrade.\n' |
|
600 ) |
|
601 ) |
591 |
602 |
592 # The .hg/hgrc file may load extensions or contain config options |
603 # The .hg/hgrc file may load extensions or contain config options |
593 # that influence repository construction. Attempt to load it and |
604 # that influence repository construction. Attempt to load it and |
594 # process any new extensions that it may have pulled in. |
605 # process any new extensions that it may have pulled in. |
595 if loadhgrc(ui, wdirvfs, hgvfs, requirements, sharedvfs): |
606 if loadhgrc(ui, wdirvfs, hgvfs, requirements, sharedvfs): |