Patchwork D10618: test: no longer directly use the sidedata config and requirements

login
register
mail settings
Submitter phabricator
Date May 3, 2021, 12:08 p.m.
Message ID <differential-rev-PHID-DREV-sxhtveiiigov5vdelht2-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48937/
State Superseded
Headers show

Comments

phabricator - May 3, 2021, 12:08 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

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

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  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

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

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
@@ -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 !)
diff --git a/tests/test-sidedata.t b/tests/test-sidedata.t
--- a/tests/test-sidedata.t
+++ b/tests/test-sidedata.t
@@ -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
diff --git a/tests/test-sidedata-exchange.t b/tests/test-sidedata-exchange.t
--- a/tests/test-sidedata-exchange.t
+++ b/tests/test-sidedata-exchange.t
@@ -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
diff --git a/tests/test-copies-in-changeset.t b/tests/test-copies-in-changeset.t
--- a/tests/test-copies-in-changeset.t
+++ b/tests/test-copies-in-changeset.t
@@ -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
diff --git a/tests/test-copies-chain-merge.t b/tests/test-copies-chain-merge.t
--- a/tests/test-copies-chain-merge.t
+++ b/tests/test-copies-chain-merge.t
@@ -52,7 +52,6 @@ 
 #if sidedata
   $ cat >> $HGRCPATH << EOF
   > [format]
-  > exp-use-side-data = yes
   > exp-use-copies-side-data-changeset = yes
   > EOF
 #endif
@@ -60,7 +59,6 @@ 
 #if pull
   $ cat >> $HGRCPATH << EOF
   > [format]
-  > exp-use-side-data = yes
   > exp-use-copies-side-data-changeset = yes
   > EOF
 #endif
@@ -68,7 +66,6 @@ 
 #if push
   $ cat >> $HGRCPATH << EOF
   > [format]
-  > exp-use-side-data = yes
   > exp-use-copies-side-data-changeset = yes
   > EOF
 #endif
@@ -76,7 +73,6 @@ 
 #if pull-upgrade
   $ cat >> $HGRCPATH << EOF
   > [format]
-  > exp-use-side-data = no
   > exp-use-copies-side-data-changeset = no
   > [experimental]
   > changegroup4 = yes
@@ -86,7 +82,6 @@ 
 #if push-upgrade
   $ cat >> $HGRCPATH << EOF
   > [format]
-  > exp-use-side-data = no
   > exp-use-copies-side-data-changeset = no
   > [experimental]
   > changegroup4 = yes
@@ -1653,7 +1648,6 @@ 
 #if upgraded
   $ cat >> $HGRCPATH << EOF
   > [format]
-  > exp-use-side-data = yes
   > exp-use-copies-side-data-changeset = yes
   > EOF
   $ hg debugformat -v
@@ -1688,7 +1682,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
@@ -1744,7 +1737,6 @@ 
 #if pull-upgrade
   $ cat >> $HGRCPATH << EOF
   > [format]
-  > exp-use-side-data = yes
   > exp-use-copies-side-data-changeset = yes
   > [experimental]
   > changegroup4 = yes
@@ -1782,7 +1774,6 @@ 
 #if push-upgrade
   $ cat >> $HGRCPATH << EOF
   > [format]
-  > exp-use-side-data = yes
   > exp-use-copies-side-data-changeset = yes
   > [experimental]
   > changegroup4 = yes