persistent-nodemap: drop the storage.revlog.nodemap.mode config
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 13 Jan 2021 23:50:03 +0100
changeset 46312 28899b6f4480
parent 46311 014ac7a32048
child 46313 4cde46f62ebf
persistent-nodemap: drop the storage.revlog.nodemap.mode config We now have a new, better, higher level, option. So we can drop the older one as planned. Differential Revision: https://phab.mercurial-scm.org/D9763
mercurial/configitems.py
mercurial/localrepo.py
mercurial/revlogutils/nodemap.py
--- a/mercurial/configitems.py	Wed Jan 13 23:41:37 2021 +0100
+++ b/mercurial/configitems.py	Wed Jan 13 23:50:03 2021 +0100
@@ -1791,10 +1791,6 @@
 )
 # experimental as long as format.use-persistent-nodemap is.
 coreconfigitem(
-    b'storage', b'revlog.nodemap.mode', default=b'compat', experimental=True
-)
-# experimental as long as format.use-persistent-nodemap is.
-coreconfigitem(
     b'storage',
     b'revlog.persistent-nodemap.slow-path',
     default=b"abort",
--- a/mercurial/localrepo.py	Wed Jan 13 23:41:37 2021 +0100
+++ b/mercurial/localrepo.py	Wed Jan 13 23:50:03 2021 +0100
@@ -1081,8 +1081,6 @@
         options[b'persistent-nodemap'] = True
     if ui.configbool(b'storage', b'revlog.persistent-nodemap.mmap'):
         options[b'persistent-nodemap.mmap'] = True
-    epnm = ui.config(b'storage', b'revlog.nodemap.mode')
-    options[b'persistent-nodemap.mode'] = epnm
     if ui.configbool(b'devel', b'persistent-nodemap'):
         options[b'devel-force-nodemap'] = True
 
--- a/mercurial/revlogutils/nodemap.py	Wed Jan 13 23:41:37 2021 +0100
+++ b/mercurial/revlogutils/nodemap.py	Wed Jan 13 23:50:03 2021 +0100
@@ -13,7 +13,6 @@
 import re
 import struct
 
-from ..i18n import _
 from ..node import hex
 
 from .. import (
@@ -143,13 +142,6 @@
     ondisk_docket = revlog._nodemap_docket
     feed_data = util.safehasattr(revlog.index, "update_nodemap_data")
     use_mmap = revlog.opener.options.get(b"persistent-nodemap.mmap")
-    mode = revlog.opener.options.get(b"persistent-nodemap.mode")
-    if not can_incremental:
-        msg = _(b"persistent nodemap in strict mode without efficient method")
-        if mode == b'warn':
-            tr._report(b"%s\n" % msg)
-        elif mode == b'strict':
-            raise error.Abort(msg)
 
     data = None
     # first attemp an incremental update of the data