test: no longer directly use the sidedata config and requirements
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 03 May 2021 12:30:03 +0200
changeset 47227 0dedd3d063b0
parent 47226 19d4802cb304
child 47228 e51392acd70c
test: no longer directly use the sidedata config and requirements They are on their way out, so we simply use revlogv2 in these cases. Some test does not requires explicite request for the revlogv2 format since the upgrade to a side-data-capable format is impled by `exp-use-copies-side-data-changeset`. Differential Revision: https://phab.mercurial-scm.org/D10618
tests/test-copies-chain-merge.t
tests/test-copies-in-changeset.t
tests/test-sidedata-exchange.t
tests/test-sidedata.t
tests/test-upgrade-repo.t
--- a/tests/test-copies-chain-merge.t	Mon May 03 12:29:52 2021 +0200
+++ b/tests/test-copies-chain-merge.t	Mon May 03 12:30:03 2021 +0200
@@ -51,7 +51,6 @@
 #if sidedata
   $ cat >> $HGRCPATH << EOF
   > [format]
-  > exp-use-side-data = yes
   > exp-use-copies-side-data-changeset = yes
   > EOF
 #endif
@@ -59,7 +58,6 @@
 #if pull
   $ cat >> $HGRCPATH << EOF
   > [format]
-  > exp-use-side-data = yes
   > exp-use-copies-side-data-changeset = yes
   > EOF
 #endif
@@ -67,7 +65,6 @@
 #if push
   $ cat >> $HGRCPATH << EOF
   > [format]
-  > exp-use-side-data = yes
   > exp-use-copies-side-data-changeset = yes
   > EOF
 #endif
@@ -75,7 +72,6 @@
 #if pull-upgrade
   $ cat >> $HGRCPATH << EOF
   > [format]
-  > exp-use-side-data = no
   > exp-use-copies-side-data-changeset = no
   > [experimental]
   > changegroup4 = yes
@@ -85,7 +81,6 @@
 #if push-upgrade
   $ cat >> $HGRCPATH << EOF
   > [format]
-  > exp-use-side-data = no
   > exp-use-copies-side-data-changeset = no
   > [experimental]
   > changegroup4 = yes
@@ -1652,7 +1647,6 @@
 #if upgraded
   $ cat >> $HGRCPATH << EOF
   > [format]
-  > exp-use-side-data = yes
   > exp-use-copies-side-data-changeset = yes
   > EOF
   $ hg debugformat -v
@@ -1687,7 +1681,6 @@
 #if upgraded-parallel
   $ cat >> $HGRCPATH << EOF
   > [format]
-  > exp-use-side-data = yes
   > exp-use-copies-side-data-changeset = yes
   > [experimental]
   > worker.repository-upgrade=yes
@@ -1743,7 +1736,6 @@
 #if pull-upgrade
   $ cat >> $HGRCPATH << EOF
   > [format]
-  > exp-use-side-data = yes
   > exp-use-copies-side-data-changeset = yes
   > [experimental]
   > changegroup4 = yes
@@ -1781,7 +1773,6 @@
 #if push-upgrade
   $ cat >> $HGRCPATH << EOF
   > [format]
-  > exp-use-side-data = yes
   > exp-use-copies-side-data-changeset = yes
   > [experimental]
   > changegroup4 = yes
--- a/tests/test-copies-in-changeset.t	Mon May 03 12:29:52 2021 +0200
+++ b/tests/test-copies-in-changeset.t	Mon May 03 12:30:03 2021 +0200
@@ -445,8 +445,9 @@
   $ hg debugsidedata -m -- 0
   $ cat << EOF > .hg/hgrc
   > [format]
-  > exp-use-side-data = yes
   > exp-use-copies-side-data-changeset = no
+  > [experimental]
+  > revlogv2 = enable-unstable-format-and-corrupt-my-data
   > EOF
   $ hg debugupgraderepo --run --quiet --no-backup > /dev/null
   $ hg debugformat -v
--- a/tests/test-sidedata-exchange.t	Mon May 03 12:29:52 2021 +0200
+++ b/tests/test-sidedata-exchange.t	Mon May 03 12:30:03 2021 +0200
@@ -8,12 +8,12 @@
 Pusher and pushed have sidedata enabled
 ---------------------------------------
 
-  $ hg init sidedata-source --config format.exp-use-side-data=yes
+  $ hg init sidedata-source --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
   $ cat << EOF >> sidedata-source/.hg/hgrc
   > [extensions]
   > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py
   > EOF
-  $ hg init sidedata-target --config format.exp-use-side-data=yes
+  $ hg init sidedata-target --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
   $ cat << EOF >> sidedata-target/.hg/hgrc
   > [extensions]
   > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py
@@ -71,12 +71,12 @@
 ---------------------------------------
 
   $ rm -rf sidedata-source sidedata-target
-  $ hg init sidedata-source --config format.exp-use-side-data=yes
+  $ hg init sidedata-source --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
   $ cat << EOF >> sidedata-source/.hg/hgrc
   > [extensions]
   > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py
   > EOF
-  $ hg init sidedata-target --config format.exp-use-side-data=yes
+  $ hg init sidedata-target --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
   $ cat << EOF >> sidedata-target/.hg/hgrc
   > [extensions]
   > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py
@@ -138,12 +138,12 @@
 --------------------------------------------
 
   $ rm -rf sidedata-source sidedata-target
-  $ hg init sidedata-source --config format.exp-use-side-data=yes
+  $ hg init sidedata-source --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
   $ cat << EOF >> sidedata-source/.hg/hgrc
   > [extensions]
   > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py
   > EOF
-  $ hg init sidedata-target --config format.exp-use-side-data=no
+  $ hg init sidedata-target --config experimental.revlogv2=no
   $ cd sidedata-source
   $ echo a > a
   $ echo b > b
@@ -186,12 +186,12 @@
 --------------------------------------------
 
   $ rm -rf sidedata-source sidedata-target
-  $ hg init sidedata-source --config format.exp-use-side-data=yes
+  $ hg init sidedata-source --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
   $ cat << EOF >> sidedata-source/.hg/hgrc
   > [extensions]
   > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py
   > EOF
-  $ hg init sidedata-target --config format.exp-use-side-data=no
+  $ hg init sidedata-target --config experimental.revlogv2=no
   $ cd sidedata-source
   $ echo a > a
   $ echo b > b
@@ -239,8 +239,8 @@
 (Push) Target has strict superset of the source
 -----------------------------------------------
 
-  $ hg init source-repo --config format.exp-use-side-data=yes
-  $ hg init target-repo --config format.exp-use-side-data=yes
+  $ hg init source-repo --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
+  $ hg init target-repo --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
   $ cat << EOF >> target-repo/.hg/hgrc
   > [extensions]
   > testsidedata=$TESTDIR/testlib/ext-sidedata.py
@@ -311,12 +311,12 @@
 target.
 
   $ rm -rf source-repo target-repo
-  $ hg init source-repo --config format.exp-use-side-data=yes
+  $ hg init source-repo --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
   $ cat << EOF >> source-repo/.hg/hgrc
   > [extensions]
   > testsidedata3=$TESTDIR/testlib/ext-sidedata-3.py
   > EOF
-  $ hg init target-repo --config format.exp-use-side-data=yes
+  $ hg init target-repo --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
   $ cat << EOF >> target-repo/.hg/hgrc
   > [extensions]
   > testsidedata4=$TESTDIR/testlib/ext-sidedata-4.py
@@ -412,8 +412,8 @@
 -----------------------------------------------
 
   $ rm -rf source-repo target-repo
-  $ hg init source-repo --config format.exp-use-side-data=yes
-  $ hg init target-repo --config format.exp-use-side-data=yes
+  $ hg init source-repo --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
+  $ hg init target-repo --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
   $ cat << EOF >> target-repo/.hg/hgrc
   > [extensions]
   > testsidedata=$TESTDIR/testlib/ext-sidedata.py
--- a/tests/test-sidedata.t	Mon May 03 12:29:52 2021 +0200
+++ b/tests/test-sidedata.t	Mon May 03 12:30:03 2021 +0200
@@ -10,7 +10,7 @@
   > testsidedata=$TESTDIR/testlib/ext-sidedata.py
   > EOF
 
-  $ hg init test-sidedata --config format.exp-use-side-data=yes
+  $ hg init test-sidedata --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
   $ cd test-sidedata
   $ echo aaa > a
   $ hg add a
@@ -48,7 +48,7 @@
 Check that we can upgrade to sidedata
 -------------------------------------
 
-  $ hg init up-no-side-data --config format.exp-use-side-data=no
+  $ hg init up-no-side-data --config experimental.revlogv2=no
   $ hg debugformat -v -R up-no-side-data
   format-variant     repo config default
   fncache:            yes    yes     yes
@@ -64,7 +64,7 @@
   compression:        zlib   zlib    zlib (no-zstd !)
   compression:        zstd   zstd    zstd (zstd !)
   compression-level:  default default default
-  $ hg debugformat -v -R up-no-side-data --config format.exp-use-side-data=yes
+  $ hg debugformat -v -R up-no-side-data --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
   format-variant     repo config default
   fncache:            yes    yes     yes
   dotencode:          yes    yes     yes
@@ -79,12 +79,12 @@
   compression:        zlib   zlib    zlib (no-zstd !)
   compression:        zstd   zstd    zstd (zstd !)
   compression-level:  default default default
-  $ hg debugupgraderepo -R up-no-side-data --config format.exp-use-side-data=yes > /dev/null
+  $ hg debugupgraderepo -R up-no-side-data --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data > /dev/null
 
 Check that we can downgrade from sidedata
 -----------------------------------------
 
-  $ hg init up-side-data --config format.exp-use-side-data=yes
+  $ hg init up-side-data --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
   $ hg debugformat -v -R up-side-data
   format-variant     repo config default
   fncache:            yes    yes     yes
@@ -100,7 +100,7 @@
   compression:        zlib   zlib    zlib (no-zstd !)
   compression:        zstd   zstd    zstd (zstd !)
   compression-level:  default default default
-  $ hg debugformat -v -R up-side-data --config format.exp-use-side-data=no
+  $ hg debugformat -v -R up-side-data --config experimental.revlogv2=no
   format-variant     repo config default
   fncache:            yes    yes     yes
   dotencode:          yes    yes     yes
@@ -115,4 +115,4 @@
   compression:        zlib   zlib    zlib (no-zstd !)
   compression:        zstd   zstd    zstd (zstd !)
   compression-level:  default default default
-  $ hg debugupgraderepo -R up-side-data --config format.exp-use-side-data=no > /dev/null
+  $ hg debugupgraderepo -R up-side-data --config experimental.revlogv2=no > /dev/null
--- a/tests/test-upgrade-repo.t	Mon May 03 12:29:52 2021 +0200
+++ b/tests/test-upgrade-repo.t	Mon May 03 12:30:03 2021 +0200
@@ -1448,13 +1448,13 @@
 
 #endif
 
-Check upgrading to a side-data revlog
--------------------------------------
+Check upgrading to a revlog format supporting sidedata
+------------------------------------------------------
 
 upgrade
 
   $ hg debugsidedata -c 0
-  $ hg --config format.exp-use-side-data=yes debugupgraderepo --run  --no-backup --config "extensions.sidedata=$TESTDIR/testlib/ext-sidedata.py" --quiet
+  $ hg --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data debugupgraderepo --run  --no-backup --config "extensions.sidedata=$TESTDIR/testlib/ext-sidedata.py" --quiet
   upgrade will perform the following actions:
   
   requirements
@@ -1462,8 +1462,8 @@
      preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd no-rust !)
      preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, sparserevlog, store (rust !)
      removed: revlogv1
-     added: exp-revlogv2.2, exp-sidedata-flag (zstd !)
-     added: exp-revlogv2.2, exp-sidedata-flag, sparserevlog (no-zstd !)
+     added: exp-revlogv2.2 (zstd !)
+     added: exp-revlogv2.2, sparserevlog (no-zstd !)
   
   processed revlogs:
     - all-filelogs
@@ -1488,7 +1488,6 @@
   $ cat .hg/requires
   dotencode
   exp-revlogv2.2
-  exp-sidedata-flag
   fncache
   generaldelta
   persistent-nodemap (rust !)
@@ -1502,14 +1501,14 @@
 
 downgrade
 
-  $ hg debugupgraderepo --config format.exp-use-side-data=no --run --no-backup --quiet
+  $ hg debugupgraderepo --config experimental.revlogv2=no --run --no-backup --quiet
   upgrade will perform the following actions:
   
   requirements
      preserved: dotencode, fncache, generaldelta, sparserevlog, store (no-zstd !)
      preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd no-rust !)
      preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, sparserevlog, store (rust !)
-     removed: exp-revlogv2.2, exp-sidedata-flag
+     removed: exp-revlogv2.2
      added: revlogv1
   
   processed revlogs:
@@ -1546,8 +1545,8 @@
 upgrade from hgrc
 
   $ cat >> .hg/hgrc << EOF
-  > [format]
-  > exp-use-side-data=yes
+  > [experimental]
+  > revlogv2=enable-unstable-format-and-corrupt-my-data
   > EOF
   $ hg debugupgraderepo --run --no-backup --quiet
   upgrade will perform the following actions:
@@ -1557,7 +1556,7 @@
      preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd no-rust !)
      preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, sparserevlog, store (rust !)
      removed: revlogv1
-     added: exp-revlogv2.2, exp-sidedata-flag
+     added: exp-revlogv2.2
   
   processed revlogs:
     - all-filelogs
@@ -1582,7 +1581,6 @@
   $ cat .hg/requires
   dotencode
   exp-revlogv2.2
-  exp-sidedata-flag
   fncache
   generaldelta
   persistent-nodemap (rust !)