Patchwork D9756: persistent-nodemap: rename the storage.revlog.nodemap.mmap option

login
register
mail settings
Submitter phabricator
Date Jan. 14, 2021, 4:06 a.m.
Message ID <differential-rev-PHID-DREV-itfamhpy5h22otg3qjei-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48070/
State Superseded
Headers show

Comments

phabricator - Jan. 14, 2021, 4:06 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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`.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9756

AFFECTED FILES
  mercurial/configitems.py
  mercurial/localrepo.py
  tests/test-persistent-nodemap.t

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-persistent-nodemap.t b/tests/test-persistent-nodemap.t
--- a/tests/test-persistent-nodemap.t
+++ b/tests/test-persistent-nodemap.t
@@ -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
 
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -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
diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -1769,7 +1769,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(