test-upgrade: narrow the `debugformat` call when upgrading to dirstate-v2
This will make the test less noisy when new requirement are added.
Differential Revision: https://phab.mercurial-scm.org/D11864
--- a/tests/test-upgrade-repo.t Thu Nov 25 18:26:50 2021 +0100
+++ b/tests/test-upgrade-repo.t Mon Dec 06 10:23:51 2021 +0100
@@ -1638,21 +1638,8 @@
Upgrade to dirstate-v2
- $ hg debugformat -v --config format.exp-rc-dirstate-v2=1
- format-variant repo config default
- fncache: yes yes yes
+ $ hg debugformat -v --config format.exp-rc-dirstate-v2=1 | grep dirstate-v2
dirstate-v2: no yes no
- dotencode: yes yes yes
- generaldelta: yes yes yes
- share-safe: no no no
- sparserevlog: yes yes yes
- persistent-nodemap: yes yes no
- copies-sdc: no no no
- revlog-v2: yes yes no
- changelog-v2: no no no
- plain-cl-delta: yes yes yes
- compression: zstd zstd zstd
- compression-level: default default default
$ hg debugupgraderepo --config format.exp-rc-dirstate-v2=1 --run
upgrade will perform the following actions:
@@ -1677,21 +1664,8 @@
removing temporary repository $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob)
$ ls .hg/upgradebackup.*/dirstate
.hg/upgradebackup.*/dirstate (glob)
- $ hg debugformat -v
- format-variant repo config default
- fncache: yes yes yes
+ $ hg debugformat -v | grep dirstate-v2
dirstate-v2: yes no no
- dotencode: yes yes yes
- generaldelta: yes yes yes
- share-safe: no no no
- sparserevlog: yes yes yes
- persistent-nodemap: yes yes no
- copies-sdc: no no no
- revlog-v2: yes yes no
- changelog-v2: no no no
- plain-cl-delta: yes yes yes
- compression: zstd zstd zstd
- compression-level: default default default
$ hg status
$ dd status=none bs=12 count=1 if=.hg/dirstate
dirstate-v2
@@ -1717,21 +1691,8 @@
downgrading from dirstate-v2 to v1
replaced files will be backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob)
removing temporary repository $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob)
- $ hg debugformat -v
- format-variant repo config default
- fncache: yes yes yes
+ $ hg debugformat -v | grep dirstate-v2
dirstate-v2: no no no
- dotencode: yes yes yes
- generaldelta: yes yes yes
- share-safe: no no no
- sparserevlog: yes yes yes
- persistent-nodemap: yes yes no
- copies-sdc: no no no
- revlog-v2: yes yes no
- changelog-v2: no no no
- plain-cl-delta: yes yes yes
- compression: zstd zstd zstd
- compression-level: default default default
$ hg status
#endif