changeset 44873:d36283e20833

nodemap: move the mode option to storage.revlog.nodemap.mode The option stay experimental as long as the main feature is. Differential Revision: https://phab.mercurial-scm.org/D8422
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 14 Apr 2020 04:23:20 +0200
parents 059c99af141d
children 5ee4b2119af9
files mercurial/configitems.py mercurial/localrepo.py tests/test-persistent-nodemap.t
diffstat 3 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/configitems.py	Tue Apr 14 03:20:21 2020 +0200
+++ b/mercurial/configitems.py	Tue Apr 14 04:23:20 2020 +0200
@@ -663,9 +663,6 @@
     b'experimental', b'rust.index', default=False,
 )
 coreconfigitem(
-    b'experimental', b'exp-persistent-nodemap.mode', default=b'compat',
-)
-coreconfigitem(
     b'experimental', b'server.filesdata.recommended-batch-size', default=50000,
 )
 coreconfigitem(
@@ -1083,6 +1080,10 @@
 coreconfigitem(
     b'storage', b'revlog.nodemap.mmap', default=True, experimental=True
 )
+# experimental as long as format.use-persistent-nodemap is.
+coreconfigitem(
+    b'storage', b'revlog.nodemap.mode', default=b'compat', experimental=True
+)
 coreconfigitem(
     b'storage', b'revlog.reuse-external-delta', default=True,
 )
--- a/mercurial/localrepo.py	Tue Apr 14 03:20:21 2020 +0200
+++ b/mercurial/localrepo.py	Tue Apr 14 04:23:20 2020 +0200
@@ -940,7 +940,7 @@
         options[b'persistent-nodemap'] = True
     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')
+    epnm = ui.config(b'storage', b'revlog.nodemap.mode')
     options[b'persistent-nodemap.mode'] = epnm
     if ui.configbool(b'devel', b'persistent-nodemap'):
         options[b'devel-force-nodemap'] = True
--- a/tests/test-persistent-nodemap.t	Tue Apr 14 03:20:21 2020 +0200
+++ b/tests/test-persistent-nodemap.t	Tue Apr 14 04:23:20 2020 +0200
@@ -10,7 +10,7 @@
   > EOF
   $ hg init test-repo
   $ cd test-repo
-  $ hg debugbuilddag .+5000 --new-file --config "experimental.exp-persistent-nodemap.mode=warn"
+  $ hg debugbuilddag .+5000 --new-file --config "storage.revlog.nodemap.mode=warn"
   persistent nodemap in strict mode without efficient method (no-rust no-pure !)
   persistent nodemap in strict mode without efficient method (no-rust no-pure !)
   $ hg debugnodemap --metadata
@@ -99,7 +99,7 @@
 
 #if no-pure no-rust
 
-  $ hg ci -m 'foo' --config "experimental.exp-persistent-nodemap.mode=strict"
+  $ hg ci -m 'foo' --config "storage.revlog.nodemap.mode=strict"
   transaction abort!
   rollback completed
   abort: persistent nodemap in strict mode without efficient method