[Request] [+ ] D9756: persistent-nodemap: rename the storage.revlog.nodemap.mmap option

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Thu Jan 14 04:06:37 UTC 2021


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

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(



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210114/12ae9e21/attachment.html>


More information about the Mercurial-patches mailing list