changeset 46306:7d096e5a5b90

persistent-nodemap: rename the storage.revlog.nodemap.mmap option Since the feature is publicly known as "persistent-nodemap" this seems better to reference it as "persistent-nodemap" in related config too. So we rename the option to `storage.revlog.persistent-nodemap.mmap`. Differential Revision: https://phab.mercurial-scm.org/D9756
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 13 Jan 2021 23:51:12 +0100
parents 8b94f05ab069
children 51da7c8ef357
files mercurial/configitems.py mercurial/localrepo.py tests/test-persistent-nodemap.t
diffstat 3 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/configitems.py	Thu Jan 14 00:56:27 2021 +0100
+++ b/mercurial/configitems.py	Wed Jan 13 23:51:12 2021 +0100
@@ -1784,7 +1784,10 @@
 )
 # experimental as long as rust is experimental (or a C version is implemented)
 coreconfigitem(
-    b'storage', b'revlog.nodemap.mmap', default=True, experimental=True
+    b'storage',
+    b'revlog.persistent-nodemap.mmap',
+    default=True,
+    experimental=True,
 )
 # experimental as long as format.use-persistent-nodemap is.
 coreconfigitem(
--- a/mercurial/localrepo.py	Thu Jan 14 00:56:27 2021 +0100
+++ b/mercurial/localrepo.py	Wed Jan 13 23:51:12 2021 +0100
@@ -1045,7 +1045,7 @@
         options[b'rust.index'] = True
     if requirementsmod.NODEMAP_REQUIREMENT in requirements:
         options[b'persistent-nodemap'] = True
-    if ui.configbool(b'storage', b'revlog.nodemap.mmap'):
+    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
--- a/tests/test-persistent-nodemap.t	Thu Jan 14 00:56:27 2021 +0100
+++ b/tests/test-persistent-nodemap.t	Wed Jan 13 23:51:12 2021 +0100
@@ -169,12 +169,12 @@
 
   $ echo bar > bar
   $ hg add bar
-  $ hg ci -m 'bar' --config storage.revlog.nodemap.mmap=no
+  $ hg ci -m 'bar' --config storage.revlog.persistent-nodemap.mmap=no
 
-  $ hg debugnodemap --check --config storage.revlog.nodemap.mmap=yes
+  $ hg debugnodemap --check --config storage.revlog.persistent-nodemap.mmap=yes
   revision in index:   5003
   revision in nodemap: 5003
-  $ hg debugnodemap --check --config storage.revlog.nodemap.mmap=no
+  $ hg debugnodemap --check --config storage.revlog.persistent-nodemap.mmap=no
   revision in index:   5003
   revision in nodemap: 5003