Patchwork D8421: nodemap: move the option for mmap usage to storage.revlog.nodemap.mmap

login
register
mail settings
Submitter phabricator
Date April 14, 2020, 3:50 p.m.
Message ID <differential-rev-PHID-DREV-jybdre2acywnfkhebibi-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46097/
State Superseded
Headers show

Comments

phabricator - April 14, 2020, 3:50 p.m.
marmoute created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The option is stay experimental as long as the main feature is.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-devel
phabricator - May 7, 2020, 1:16 p.m.
Alphare added inline comments.
Alphare accepted this revision.

INLINE COMMENTS

> configitems.py:1082
>  )
> +# experimental as long as rust is experimental (or a C implemented)
> +coreconfigitem(

Looks like you accidentally some words at the end of that comment

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8421/new/

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

To: marmoute, #hg-reviewers, Alphare
Cc: Alphare, 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
@@ -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
 
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -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
diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -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 implemented)
+coreconfigitem(
+    b'storage', b'revlog.nodemap.mmap', default=True, experimental=True
+)
 coreconfigitem(
     b'storage', b'revlog.reuse-external-delta', default=True,
 )