mercurial/localrepo.py
changeset 46310 fc2d5c0aed7f
parent 46309 2c9c88879ab7
child 46311 014ac7a32048
equal deleted inserted replaced
46309:2c9c88879ab7 46310:fc2d5c0aed7f
    57     pushkey,
    57     pushkey,
    58     pycompat,
    58     pycompat,
    59     rcutil,
    59     rcutil,
    60     repoview,
    60     repoview,
    61     requirements as requirementsmod,
    61     requirements as requirementsmod,
       
    62     revlog,
    62     revset,
    63     revset,
    63     revsetlang,
    64     revsetlang,
    64     scmutil,
    65     scmutil,
    65     sparse,
    66     sparse,
    66     store as storemod,
    67     store as storemod,
  1045         options[b'rust.index'] = True
  1046         options[b'rust.index'] = True
  1046     if requirementsmod.NODEMAP_REQUIREMENT in requirements:
  1047     if requirementsmod.NODEMAP_REQUIREMENT in requirements:
  1047         slow_path = ui.config(
  1048         slow_path = ui.config(
  1048             b'storage', b'revlog.persistent-nodemap.slow-path'
  1049             b'storage', b'revlog.persistent-nodemap.slow-path'
  1049         )
  1050         )
  1050         if slow_path not in (b'allow'):
  1051         if slow_path not in (b'allow', b'warn'):
  1051             default = ui.config_default(
  1052             default = ui.config_default(
  1052                 b'storage', b'revlog.persistent-nodemap.slow-path'
  1053                 b'storage', b'revlog.persistent-nodemap.slow-path'
  1053             )
  1054             )
  1054             msg = _(
  1055             msg = _(
  1055                 b'unknown value for config '
  1056                 b'unknown value for config '
  1057             )
  1058             )
  1058             ui.warn(msg % slow_path)
  1059             ui.warn(msg % slow_path)
  1059             if not ui.quiet:
  1060             if not ui.quiet:
  1060                 ui.warn(_(b'falling back to default value: %s\n') % default)
  1061                 ui.warn(_(b'falling back to default value: %s\n') % default)
  1061             slow_path = default
  1062             slow_path = default
       
  1063 
       
  1064         msg = _(
       
  1065             b"accessing `persistent-nodemap` repository without associated "
       
  1066             b"fast implementation."
       
  1067         )
       
  1068         hint = _(
       
  1069             b"check `hg help config.format.use-persistent-nodemap` "
       
  1070             b"for details"
       
  1071         )
       
  1072         if slow_path == b'warn' and not revlog.HAS_FAST_PERSISTENT_NODEMAP:
       
  1073             msg = b"warning: " + msg + b'\n'
       
  1074             ui.warn(msg)
       
  1075             if not ui.quiet:
       
  1076                 hint = b'(' + hint + b')\n'
       
  1077                 ui.warn(hint)
  1062         options[b'persistent-nodemap'] = True
  1078         options[b'persistent-nodemap'] = True
  1063     if ui.configbool(b'storage', b'revlog.persistent-nodemap.mmap'):
  1079     if ui.configbool(b'storage', b'revlog.persistent-nodemap.mmap'):
  1064         options[b'persistent-nodemap.mmap'] = True
  1080         options[b'persistent-nodemap.mmap'] = True
  1065     epnm = ui.config(b'storage', b'revlog.nodemap.mode')
  1081     epnm = ui.config(b'storage', b'revlog.nodemap.mode')
  1066     options[b'persistent-nodemap.mode'] = epnm
  1082     options[b'persistent-nodemap.mode'] = epnm