changeset 44795:059c99af141d

nodemap: move the option for mmap usage to storage.revlog.nodemap.mmap The option is stay experimental as long as the main feature is. Differential Revision: https://phab.mercurial-scm.org/D8421
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 14 Apr 2020 03:20:21 +0200
parents 3cfcbb219496
children d36283e20833
files mercurial/configitems.py mercurial/localrepo.py tests/test-persistent-nodemap.t
diffstat 3 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/configitems.py	Tue Apr 14 04:08:46 2020 +0200
+++ b/mercurial/configitems.py	Tue Apr 14 03:20:21 2020 +0200
@@ -663,9 +663,6 @@
     b'experimental', b'rust.index', default=False,
 )
 coreconfigitem(
-    b'experimental', b'exp-persistent-nodemap.mmap', default=True,
-)
-coreconfigitem(
     b'experimental', b'exp-persistent-nodemap.mode', default=b'compat',
 )
 coreconfigitem(
@@ -1082,6 +1079,10 @@
     default=True,
     alias=[(b'format', b'aggressivemergedeltas')],
 )
+# experimental as long as rust is experimental (or a C version is implemented)
+coreconfigitem(
+    b'storage', b'revlog.nodemap.mmap', default=True, experimental=True
+)
 coreconfigitem(
     b'storage', b'revlog.reuse-external-delta', default=True,
 )
--- a/mercurial/localrepo.py	Tue Apr 14 04:08:46 2020 +0200
+++ b/mercurial/localrepo.py	Tue Apr 14 03:20:21 2020 +0200
@@ -938,7 +938,7 @@
         options[b'rust.index'] = True
     if NODEMAP_REQUIREMENT in requirements:
         options[b'persistent-nodemap'] = True
-    if ui.configbool(b'experimental', b'exp-persistent-nodemap.mmap'):
+    if ui.configbool(b'storage', b'revlog.nodemap.mmap'):
         options[b'persistent-nodemap.mmap'] = True
     epnm = ui.config(b'experimental', b'exp-persistent-nodemap.mode')
     options[b'persistent-nodemap.mode'] = epnm
--- a/tests/test-persistent-nodemap.t	Tue Apr 14 04:08:46 2020 +0200
+++ b/tests/test-persistent-nodemap.t	Tue Apr 14 03:20:21 2020 +0200
@@ -156,12 +156,12 @@
 
   $ echo bar > bar
   $ hg add bar
-  $ hg ci -m 'bar' --config experimental.exp-persistent-nodemap.mmap=no
+  $ hg ci -m 'bar' --config storage.revlog.nodemap.mmap=no
 
-  $ hg debugnodemap --check --config experimental.exp-persistent-nodemap.mmap=yes
+  $ hg debugnodemap --check --config storage.revlog.nodemap.mmap=yes
   revision in index:   5003
   revision in nodemap: 5003
-  $ hg debugnodemap --check --config experimental.exp-persistent-nodemap.mmap=no
+  $ hg debugnodemap --check --config storage.revlog.nodemap.mmap=no
   revision in index:   5003
   revision in nodemap: 5003