[Request] [+-- ] D12129: dirstate-v2: rename the configuration to enable the format

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Tue Feb 1 17:00:43 UTC 2022


marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
marmoute added a comment.


  This patch is intended for stable.

REVISION SUMMARY
  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).

REPOSITORY
  rHG Mercurial

BRANCH
  stable

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

AFFECTED FILES
  mercurial/configitems.py
  mercurial/helptext/config.txt
  mercurial/helptext/internals/dirstate-v2.txt
  mercurial/helptext/rust.txt
  mercurial/localrepo.py
  tests/test-basic.t
  tests/test-commandserver.t
  tests/test-dirstate-race.t
  tests/test-dirstate-race2.t
  tests/test-dirstate.t
  tests/test-help.t
  tests/test-hgignore.t
  tests/test-permissions.t
  tests/test-persistent-nodemap.t
  tests/test-purge.t
  tests/test-share-safe.t
  tests/test-status.t
  tests/test-stream-bundle-v2.t
  tests/test-symlinks.t
  tests/test-upgrade-repo.t

CHANGE DETAILS

diff --git a/tests/test-upgrade-repo.t b/tests/test-upgrade-repo.t
--- a/tests/test-upgrade-repo.t
+++ b/tests/test-upgrade-repo.t
@@ -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
diff --git a/tests/test-symlinks.t b/tests/test-symlinks.t
--- a/tests/test-symlinks.t
+++ b/tests/test-symlinks.t
@@ -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
diff --git a/tests/test-stream-bundle-v2.t b/tests/test-stream-bundle-v2.t
--- a/tests/test-stream-bundle-v2.t
+++ b/tests/test-stream-bundle-v2.t
@@ -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
 
diff --git a/tests/test-status.t b/tests/test-status.t
--- a/tests/test-status.t
+++ b/tests/test-status.t
@@ -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
diff --git a/tests/test-share-safe.t b/tests/test-share-safe.t
--- a/tests/test-share-safe.t
+++ b/tests/test-share-safe.t
@@ -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:
diff --git a/tests/test-purge.t b/tests/test-purge.t
--- a/tests/test-purge.t
+++ b/tests/test-purge.t
@@ -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
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
@@ -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
   
diff --git a/tests/test-permissions.t b/tests/test-permissions.t
--- a/tests/test-permissions.t
+++ b/tests/test-permissions.t
@@ -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
diff --git a/tests/test-hgignore.t b/tests/test-hgignore.t
--- a/tests/test-hgignore.t
+++ b/tests/test-hgignore.t
@@ -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
diff --git a/tests/test-help.t b/tests/test-help.t
--- a/tests/test-help.t
+++ b/tests/test-help.t
@@ -1585,7 +1585,7 @@
   
       "usefncache"
   
-      "exp-rc-dirstate-v2"
+      "use-dirstate-v2"
   
       "use-persistent-nodemap"
   
diff --git a/tests/test-dirstate.t b/tests/test-dirstate.t
--- a/tests/test-dirstate.t
+++ b/tests/test-dirstate.t
@@ -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
diff --git a/tests/test-dirstate-race2.t b/tests/test-dirstate-race2.t
--- a/tests/test-dirstate-race2.t
+++ b/tests/test-dirstate-race2.t
@@ -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
diff --git a/tests/test-dirstate-race.t b/tests/test-dirstate-race.t
--- a/tests/test-dirstate-race.t
+++ b/tests/test-dirstate-race.t
@@ -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
diff --git a/tests/test-commandserver.t b/tests/test-commandserver.t
--- a/tests/test-commandserver.t
+++ b/tests/test-commandserver.t
@@ -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
diff --git a/tests/test-basic.t b/tests/test-basic.t
--- a/tests/test-basic.t
+++ b/tests/test-basic.t
@@ -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
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -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
diff --git a/mercurial/helptext/rust.txt b/mercurial/helptext/rust.txt
--- a/mercurial/helptext/rust.txt
+++ b/mercurial/helptext/rust.txt
@@ -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
diff --git a/mercurial/helptext/internals/dirstate-v2.txt b/mercurial/helptext/internals/dirstate-v2.txt
--- a/mercurial/helptext/internals/dirstate-v2.txt
+++ b/mercurial/helptext/internals/dirstate-v2.txt
@@ -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.
diff --git a/mercurial/helptext/config.txt b/mercurial/helptext/config.txt
--- a/mercurial/helptext/config.txt
+++ b/mercurial/helptext/config.txt
@@ -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`.
diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -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',



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/20220201/a2a4f6cf/attachment-0001.html>


More information about the Mercurial-patches mailing list