equal
deleted
inserted
replaced
573 if ( |
573 if ( |
574 shared |
574 shared |
575 and requirementsmod.SHARESAFE_REQUIREMENT |
575 and requirementsmod.SHARESAFE_REQUIREMENT |
576 not in _readrequires(sharedvfs, True) |
576 not in _readrequires(sharedvfs, True) |
577 ): |
577 ): |
|
578 mismatch_warn = ui.configbool( |
|
579 b'share', b'safe-mismatch.source-not-safe.warn' |
|
580 ) |
578 mismatch_config = ui.config( |
581 mismatch_config = ui.config( |
579 b'share', b'safe-mismatch.source-not-safe' |
582 b'share', b'safe-mismatch.source-not-safe' |
580 ) |
583 ) |
581 if mismatch_config in ( |
584 if mismatch_config in ( |
582 b'downgrade-allow', |
585 b'downgrade-allow', |
590 ui, |
593 ui, |
591 hgvfs, |
594 hgvfs, |
592 sharedvfs, |
595 sharedvfs, |
593 requirements, |
596 requirements, |
594 mismatch_config, |
597 mismatch_config, |
|
598 mismatch_warn, |
595 ) |
599 ) |
596 elif mismatch_config == b'abort': |
600 elif mismatch_config == b'abort': |
597 raise error.Abort( |
601 raise error.Abort( |
598 _( |
602 _( |
599 b"share source does not support exp-sharesafe requirement" |
603 b"share source does not support exp-sharesafe requirement" |
616 requirements |= _readrequires(storevfs, False) |
620 requirements |= _readrequires(storevfs, False) |
617 elif shared: |
621 elif shared: |
618 sourcerequires = _readrequires(sharedvfs, False) |
622 sourcerequires = _readrequires(sharedvfs, False) |
619 if requirementsmod.SHARESAFE_REQUIREMENT in sourcerequires: |
623 if requirementsmod.SHARESAFE_REQUIREMENT in sourcerequires: |
620 mismatch_config = ui.config(b'share', b'safe-mismatch.source-safe') |
624 mismatch_config = ui.config(b'share', b'safe-mismatch.source-safe') |
|
625 mismatch_warn = ui.configbool( |
|
626 b'share', b'safe-mismatch.source-safe.warn' |
|
627 ) |
621 if mismatch_config in ( |
628 if mismatch_config in ( |
622 b'upgrade-allow', |
629 b'upgrade-allow', |
623 b'allow', |
630 b'allow', |
624 b'upgrade-abort', |
631 b'upgrade-abort', |
625 ): |
632 ): |
630 ui, |
637 ui, |
631 hgvfs, |
638 hgvfs, |
632 storevfs, |
639 storevfs, |
633 requirements, |
640 requirements, |
634 mismatch_config, |
641 mismatch_config, |
|
642 mismatch_warn, |
635 ) |
643 ) |
636 elif mismatch_config == b'abort': |
644 elif mismatch_config == b'abort': |
637 raise error.Abort( |
645 raise error.Abort( |
638 _( |
646 _( |
639 b'version mismatch: source uses share-safe' |
647 b'version mismatch: source uses share-safe' |