nodemap: move the main switch to the `format` section
The config to enable persistent nodemap is now `format.use-persistent-nodemap`.
However the option remain marked as experimental because it only improve
performance for people using the rust extensions.
Differential Revision: https://phab.mercurial-scm.org/D8419
--- a/mercurial/configitems.py Tue Apr 14 03:27:04 2020 +0200
+++ b/mercurial/configitems.py Tue Apr 14 03:18:14 2020 +0200
@@ -675,9 +675,6 @@
b'experimental', b'rust.index', default=False,
)
coreconfigitem(
- b'experimental', b'exp-persistent-nodemap', default=False,
-)
-coreconfigitem(
b'experimental', b'exp-persistent-nodemap.mmap', default=True,
)
coreconfigitem(
@@ -787,6 +784,9 @@
b'format', b'usestore', default=True,
)
coreconfigitem(
+ b'format', b'use-persistent-nodemap', default=False, experimental=True
+)
+coreconfigitem(
b'format',
b'exp-use-copies-side-data-changeset',
default=False,
--- a/mercurial/localrepo.py Tue Apr 14 03:27:04 2020 +0200
+++ b/mercurial/localrepo.py Tue Apr 14 03:18:14 2020 +0200
@@ -3664,7 +3664,7 @@
if ui.configbool(b'format', b'bookmarks-in-store'):
requirements.add(bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT)
- if ui.configbool(b'experimental', b'exp-persistent-nodemap'):
+ if ui.configbool(b'format', b'use-persistent-nodemap'):
requirements.add(NODEMAP_REQUIREMENT)
return requirements
--- a/tests/test-persistent-nodemap.t Tue Apr 14 03:27:04 2020 +0200
+++ b/tests/test-persistent-nodemap.t Tue Apr 14 03:18:14 2020 +0200
@@ -3,8 +3,8 @@
===================================
$ cat << EOF >> $HGRCPATH
- > [experimental]
- > exp-persistent-nodemap=yes
+ > [format]
+ > use-persistent-nodemap=yes
> [devel]
> persistent-nodemap=yes
> EOF