mercurial/localrepo.py
changeset 49343 4f04bb0d8deb
parent 49313 5c01ca5f9f1e
child 49355 0540c1628fd4
equal deleted inserted replaced
49342:67b210bb5ce2 49343:4f04bb0d8deb
   626                 b'share', b'safe-mismatch.source-not-safe.warn'
   626                 b'share', b'safe-mismatch.source-not-safe.warn'
   627             )
   627             )
   628             mismatch_config = ui.config(
   628             mismatch_config = ui.config(
   629                 b'share', b'safe-mismatch.source-not-safe'
   629                 b'share', b'safe-mismatch.source-not-safe'
   630             )
   630             )
       
   631             mismatch_verbose_upgrade = ui.configbool(
       
   632                 b'share', b'safe-mismatch.source-not-safe:verbose-upgrade'
       
   633             )
   631             if mismatch_config in (
   634             if mismatch_config in (
   632                 b'downgrade-allow',
   635                 b'downgrade-allow',
   633                 b'allow',
   636                 b'allow',
   634                 b'downgrade-abort',
   637                 b'downgrade-abort',
   635             ):
   638             ):
   641                     hgvfs,
   644                     hgvfs,
   642                     sharedvfs,
   645                     sharedvfs,
   643                     requirements,
   646                     requirements,
   644                     mismatch_config,
   647                     mismatch_config,
   645                     mismatch_warn,
   648                     mismatch_warn,
       
   649                     mismatch_verbose_upgrade,
   646                 )
   650                 )
   647             elif mismatch_config == b'abort':
   651             elif mismatch_config == b'abort':
   648                 raise error.Abort(
   652                 raise error.Abort(
   649                     _(b"share source does not support share-safe requirement"),
   653                     _(b"share source does not support share-safe requirement"),
   650                     hint=hint,
   654                     hint=hint,
   666         if requirementsmod.SHARESAFE_REQUIREMENT in sourcerequires:
   670         if requirementsmod.SHARESAFE_REQUIREMENT in sourcerequires:
   667             mismatch_config = ui.config(b'share', b'safe-mismatch.source-safe')
   671             mismatch_config = ui.config(b'share', b'safe-mismatch.source-safe')
   668             mismatch_warn = ui.configbool(
   672             mismatch_warn = ui.configbool(
   669                 b'share', b'safe-mismatch.source-safe.warn'
   673                 b'share', b'safe-mismatch.source-safe.warn'
   670             )
   674             )
       
   675             mismatch_verbose_upgrade = ui.configbool(
       
   676                 b'share', b'safe-mismatch.source-safe:verbose-upgrade'
       
   677             )
   671             if mismatch_config in (
   678             if mismatch_config in (
   672                 b'upgrade-allow',
   679                 b'upgrade-allow',
   673                 b'allow',
   680                 b'allow',
   674                 b'upgrade-abort',
   681                 b'upgrade-abort',
   675             ):
   682             ):
   681                     hgvfs,
   688                     hgvfs,
   682                     storevfs,
   689                     storevfs,
   683                     requirements,
   690                     requirements,
   684                     mismatch_config,
   691                     mismatch_config,
   685                     mismatch_warn,
   692                     mismatch_warn,
       
   693                     mismatch_verbose_upgrade,
   686                 )
   694                 )
   687             elif mismatch_config == b'abort':
   695             elif mismatch_config == b'abort':
   688                 raise error.Abort(
   696                 raise error.Abort(
   689                     _(
   697                     _(
   690                         b'version mismatch: source uses share-safe'
   698                         b'version mismatch: source uses share-safe'