dirstate-v2: rename the configuration to enable the format
The rename of the old experimental name was overlooked before the 6.0 release.
We rename everything to use the new name (and keep the released name as an alias
for compatibility).
Differential Revision: https://phab.mercurial-scm.org/D12129
--- a/mercurial/configitems.py Mon Jan 24 11:49:06 2022 +0100
+++ b/mercurial/configitems.py Tue Feb 01 16:36:20 2022 +0100
@@ -1306,9 +1306,10 @@
# Enable this dirstate format *when creating a new repository*.
# Which format to use for existing repos is controlled by .hg/requires
b'format',
- b'exp-rc-dirstate-v2',
+ b'use-dirstate-v2',
default=False,
experimental=True,
+ alias=[(b'format', b'exp-rc-dirstate-v2')],
)
coreconfigitem(
b'format',
@@ -1880,7 +1881,7 @@
default=b'skip',
experimental=True,
)
-# experimental as long as format.exp-rc-dirstate-v2 is.
+# experimental as long as format.use-dirstate-v2 is.
coreconfigitem(
b'storage',
b'dirstate-v2.slow-path',
--- a/mercurial/helptext/config.txt Mon Jan 24 11:49:06 2022 +0100
+++ b/mercurial/helptext/config.txt Tue Feb 01 16:36:20 2022 +0100
@@ -892,7 +892,7 @@
Enabled by default.
-``exp-rc-dirstate-v2``
+``use-dirstate-v2``
Enable or disable the experimental "dirstate-v2" feature. The dirstate
functionality is shared by all commands interacting with the working copy.
The new version is more robust, faster and stores more information.
@@ -916,7 +916,7 @@
$ hg debugupgraderepo \
--run \
- --config format.exp-rc-dirstate-v2=False \
+ --config format.use-dirstate-v2=False \
--config storage.dirstate-v2.slow-path=allow
For a more comprehensive guide, see :hg:`help internals.dirstate-v2`.
--- a/mercurial/helptext/internals/dirstate-v2.txt Mon Jan 24 11:49:06 2022 +0100
+++ b/mercurial/helptext/internals/dirstate-v2.txt Tue Feb 01 16:36:20 2022 +0100
@@ -37,12 +37,12 @@
------------------------------------------------
When creating a new local repository such as with `hg init` or `hg clone`,
-the `exp-rc-dirstate-v2` boolean in the `format` configuration section
+the `use-dirstate-v2` boolean in the `format` configuration section
controls whether to use this file format.
This is disabled by default as of this writing.
To enable it for a single repository, run for example::
- $ hg init my-project --config format.exp-rc-dirstate-v2=1
+ $ hg init my-project --config format.use-dirstate-v2=1
Checking the format of an existing local repository
--------------------------------------------------
@@ -63,15 +63,15 @@
The `debugupgrade` command does various upgrades or downgrades
on a local repository
based on the current Mercurial version and on configuration.
-The same `format.exp-rc-dirstate-v2` configuration is used again.
+The same `format.use-dirstate-v2` configuration is used again.
Example to upgrade::
- $ hg debugupgrade --config format.exp-rc-dirstate-v2=1
+ $ hg debugupgrade --config format.use-dirstate-v2=1
Example to downgrade to `dirstate-v1`::
- $ hg debugupgrade --config format.exp-rc-dirstate-v2=0
+ $ hg debugupgrade --config format.use-dirstate-v2=0
Both of this commands do nothing but print a list of proposed changes,
which may include changes unrelated to the dirstate.
--- a/mercurial/helptext/rust.txt Mon Jan 24 11:49:06 2022 +0100
+++ b/mercurial/helptext/rust.txt Tue Feb 01 16:36:20 2022 +0100
@@ -19,7 +19,7 @@
- discovery of differences between repositories (pull/push)
- nodemap (see :hg:`help config.format.use-persistent-nodemap`)
- all commands using the dirstate (status, commit, diff, add, update, etc.)
- - dirstate-v2 (see :hg:`help config.format.exp-rc-dirstate-v2`)
+ - dirstate-v2 (see :hg:`help config.format.use-dirstate-v2`)
- iteration over ancestors in a graph
More features are in the works, and improvements on the above listed are still
--- a/mercurial/localrepo.py Mon Jan 24 11:49:06 2022 +0100
+++ b/mercurial/localrepo.py Tue Feb 01 16:36:20 2022 +0100
@@ -1189,7 +1189,7 @@
b"fast implementation."
)
hint = _(
- b"check `hg help config.format.exp-rc-dirstate-v2` " b"for details"
+ b"check `hg help config.format.use-dirstate-v2` " b"for details"
)
if not dirstate.HAS_FAST_DIRSTATE_V2:
if slow_path == b'warn':
@@ -3630,9 +3630,9 @@
if ui.configbool(b'format', b'sparse-revlog'):
requirements.add(requirementsmod.SPARSEREVLOG_REQUIREMENT)
- # experimental config: format.exp-rc-dirstate-v2
+ # experimental config: format.use-dirstate-v2
# Keep this logic in sync with `has_dirstate_v2()` in `tests/hghave.py`
- if ui.configbool(b'format', b'exp-rc-dirstate-v2'):
+ if ui.configbool(b'format', b'use-dirstate-v2'):
requirements.add(requirementsmod.DIRSTATE_V2_REQUIREMENT)
# experimental config: format.exp-use-copies-side-data-changeset
--- a/tests/test-basic.t Mon Jan 24 11:49:06 2022 +0100
+++ b/tests/test-basic.t Tue Feb 01 16:36:20 2022 +0100
@@ -6,7 +6,7 @@
devel.all-warnings=true
devel.default-date=0 0
extensions.fsmonitor= (fsmonitor !)
- format.exp-rc-dirstate-v2=1 (dirstate-v2 !)
+ format.use-dirstate-v2=1 (dirstate-v2 !)
largefiles.usercache=$TESTTMP/.cache/largefiles
lfs.usercache=$TESTTMP/.cache/lfs
ui.slash=True
--- a/tests/test-commandserver.t Mon Jan 24 11:49:06 2022 +0100
+++ b/tests/test-commandserver.t Tue Feb 01 16:36:20 2022 +0100
@@ -218,7 +218,7 @@
devel.all-warnings=true
devel.default-date=0 0
extensions.fsmonitor= (fsmonitor !)
- format.exp-rc-dirstate-v2=1 (dirstate-v2 !)
+ format.use-dirstate-v2=1 (dirstate-v2 !)
largefiles.usercache=$TESTTMP/.cache/largefiles
lfs.usercache=$TESTTMP/.cache/lfs
ui.slash=True
--- a/tests/test-dirstate-race.t Mon Jan 24 11:49:06 2022 +0100
+++ b/tests/test-dirstate-race.t Tue Feb 01 16:36:20 2022 +0100
@@ -3,7 +3,7 @@
#if dirstate-v2
$ cat >> $HGRCPATH << EOF
> [format]
- > exp-rc-dirstate-v2=1
+ > use-dirstate-v2=1
> [storage]
> dirstate-v2.slow-path=allow
> EOF
--- a/tests/test-dirstate-race2.t Mon Jan 24 11:49:06 2022 +0100
+++ b/tests/test-dirstate-race2.t Tue Feb 01 16:36:20 2022 +0100
@@ -3,7 +3,7 @@
#if dirstate-v2
$ cat >> $HGRCPATH << EOF
> [format]
- > exp-rc-dirstate-v2=1
+ > use-dirstate-v2=1
> [storage]
> dirstate-v2.slow-path=allow
> EOF
--- a/tests/test-dirstate.t Mon Jan 24 11:49:06 2022 +0100
+++ b/tests/test-dirstate.t Tue Feb 01 16:36:20 2022 +0100
@@ -3,7 +3,7 @@
#if dirstate-v2
$ cat >> $HGRCPATH << EOF
> [format]
- > exp-rc-dirstate-v2=1
+ > use-dirstate-v2=1
> [storage]
> dirstate-v2.slow-path=allow
> EOF
--- a/tests/test-help.t Mon Jan 24 11:49:06 2022 +0100
+++ b/tests/test-help.t Tue Feb 01 16:36:20 2022 +0100
@@ -1585,7 +1585,7 @@
"usefncache"
- "exp-rc-dirstate-v2"
+ "use-dirstate-v2"
"use-persistent-nodemap"
--- a/tests/test-hgignore.t Mon Jan 24 11:49:06 2022 +0100
+++ b/tests/test-hgignore.t Tue Feb 01 16:36:20 2022 +0100
@@ -3,7 +3,7 @@
#if dirstate-v2
$ cat >> $HGRCPATH << EOF
> [format]
- > exp-rc-dirstate-v2=1
+ > use-dirstate-v2=1
> [storage]
> dirstate-v2.slow-path=allow
> EOF
--- a/tests/test-permissions.t Mon Jan 24 11:49:06 2022 +0100
+++ b/tests/test-permissions.t Tue Feb 01 16:36:20 2022 +0100
@@ -5,7 +5,7 @@
#if dirstate-v2
$ cat >> $HGRCPATH << EOF
> [format]
- > exp-rc-dirstate-v2=1
+ > use-dirstate-v2=1
> [storage]
> dirstate-v2.slow-path=allow
> EOF
--- a/tests/test-persistent-nodemap.t Mon Jan 24 11:49:06 2022 +0100
+++ b/tests/test-persistent-nodemap.t Tue Feb 01 16:36:20 2022 +0100
@@ -800,7 +800,7 @@
requirements
preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !)
preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !)
- preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !)
+ preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !)
removed: persistent-nodemap
processed revlogs:
@@ -844,7 +844,7 @@
requirements
preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !)
preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !)
- preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !)
+ preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !)
added: persistent-nodemap
processed revlogs:
@@ -876,7 +876,7 @@
requirements
preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !)
preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !)
- preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !)
+ preserved: dotencode, use-dirstate-v2, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !)
optimisations: re-delta-all
--- a/tests/test-purge.t Mon Jan 24 11:49:06 2022 +0100
+++ b/tests/test-purge.t Tue Feb 01 16:36:20 2022 +0100
@@ -3,7 +3,7 @@
#if dirstate-v2
$ cat >> $HGRCPATH << EOF
> [format]
- > exp-rc-dirstate-v2=1
+ > use-dirstate-v2=1
> [storage]
> dirstate-v2.slow-path=allow
> EOF
--- a/tests/test-share-safe.t Mon Jan 24 11:49:06 2022 +0100
+++ b/tests/test-share-safe.t Tue Feb 01 16:36:20 2022 +0100
@@ -225,7 +225,7 @@
requirements
preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-dirstate-v2 !)
- preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (dirstate-v2 !)
+ preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (dirstate-v2 !)
added: revlog-compression-zstd
processed revlogs:
@@ -253,8 +253,8 @@
requirements
preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !)
preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !)
- preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd dirstate-v2 !)
- preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !)
+ preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd dirstate-v2 !)
+ preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !)
added: persistent-nodemap
processed revlogs:
@@ -360,7 +360,7 @@
$ hg debugupgraderepo -q
requirements
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-dirstate-v2 !)
- preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !)
+ preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !)
added: share-safe
processed revlogs:
@@ -373,7 +373,7 @@
requirements
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-dirstate-v2 !)
- preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !)
+ preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !)
added: share-safe
share-safe
@@ -454,7 +454,7 @@
$ hg debugupgraderepo -q
requirements
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-dirstate-v2 !)
- preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !)
+ preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !)
removed: share-safe
processed revlogs:
@@ -467,7 +467,7 @@
requirements
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-dirstate-v2 !)
- preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !)
+ preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !)
removed: share-safe
processed revlogs:
@@ -553,7 +553,7 @@
requirements
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-dirstate-v2 !)
- preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !)
+ preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !)
added: share-safe
processed revlogs:
--- a/tests/test-status.t Mon Jan 24 11:49:06 2022 +0100
+++ b/tests/test-status.t Tue Feb 01 16:36:20 2022 +0100
@@ -3,7 +3,7 @@
#if dirstate-v2
$ cat >> $HGRCPATH << EOF
> [format]
- > exp-rc-dirstate-v2=1
+ > use-dirstate-v2=1
> [storage]
> dirstate-v2.slow-path=allow
> EOF
--- a/tests/test-stream-bundle-v2.t Mon Jan 24 11:49:06 2022 +0100
+++ b/tests/test-stream-bundle-v2.t Tue Feb 01 16:36:20 2022 +0100
@@ -48,12 +48,12 @@
stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Csparserevlog%2Cstore} (mandatory: True) (no-zstd !)
stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cfncache%2Cgeneraldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore} (mandatory: True) (zstd no-rust !)
stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore} (mandatory: True) (rust no-dirstate-v2 !)
- stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cexp-rc-dirstate-v2%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore} (mandatory: True) (dirstate-v2 !)
+ stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cuse-dirstate-v2%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore} (mandatory: True) (dirstate-v2 !)
$ hg debugbundle --spec bundle.hg
none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Csparserevlog%2Cstore (no-zstd !)
none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore (zstd no-rust !)
none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore (rust no-dirstate-v2 !)
- none-v2;stream=v2;requirements%3Ddotencode%2Cexp-rc-dirstate-v2%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore (dirstate-v2 !)
+ none-v2;stream=v2;requirements%3Ddotencode%2Cuse-dirstate-v2%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore (dirstate-v2 !)
Test that we can apply the bundle as a stream clone bundle
--- a/tests/test-symlinks.t Mon Jan 24 11:49:06 2022 +0100
+++ b/tests/test-symlinks.t Tue Feb 01 16:36:20 2022 +0100
@@ -5,7 +5,7 @@
#if dirstate-v2
$ cat >> $HGRCPATH << EOF
> [format]
- > exp-rc-dirstate-v2=1
+ > use-dirstate-v2=1
> [storage]
> dirstate-v2.slow-path=allow
> EOF
--- a/tests/test-upgrade-repo.t Mon Jan 24 11:49:06 2022 +0100
+++ b/tests/test-upgrade-repo.t Tue Feb 01 16:36:20 2022 +0100
@@ -1645,9 +1645,9 @@
Upgrade to dirstate-v2
- $ hg debugformat -v --config format.exp-rc-dirstate-v2=1 | grep dirstate-v2
+ $ hg debugformat -v --config format.use-dirstate-v2=1 | grep dirstate-v2
dirstate-v2: no yes no
- $ hg debugupgraderepo --config format.exp-rc-dirstate-v2=1 --run
+ $ hg debugupgraderepo --config format.use-dirstate-v2=1 --run
upgrade will perform the following actions:
requirements
@@ -1707,14 +1707,14 @@
dirstate-v2: upgrade and downgrade from and empty repository:
-------------------------------------------------------------
- $ hg init --config format.exp-rc-dirstate-v2=no dirstate-v2-empty
+ $ hg init --config format.use-dirstate-v2=no dirstate-v2-empty
$ cd dirstate-v2-empty
$ hg debugformat | grep dirstate-v2
dirstate-v2: no
upgrade
- $ hg debugupgraderepo --run --config format.exp-rc-dirstate-v2=yes
+ $ hg debugupgraderepo --run --config format.use-dirstate-v2=yes
upgrade will perform the following actions:
requirements
@@ -1741,7 +1741,7 @@
downgrade
- $ hg debugupgraderepo --run --config format.exp-rc-dirstate-v2=no
+ $ hg debugupgraderepo --run --config format.use-dirstate-v2=no
upgrade will perform the following actions:
requirements