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.
hg-reviewers |
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.
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | tests/test-copies-chain-merge.t (9 lines) | |||
M | tests/test-copies-in-changeset.t (3 lines) | |||
M | tests/test-sidedata-exchange.t (28 lines) | |||
M | tests/test-sidedata.t (14 lines) | |||
M | tests/test-upgrade-repo.t (22 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
4bff485ad474 | a04b2b69d3c9 | Pierre-Yves David | May 3 2021, 6:30 AM |
> copies.read-from = changeset-only | > copies.read-from = changeset-only | ||||
> copies.write-to = changeset-only | > copies.write-to = changeset-only | ||||
> EOF | > EOF | ||||
#endif | #endif | ||||
#if sidedata | #if sidedata | ||||
$ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
> [format] | > [format] | ||||
> exp-use-side-data = yes | |||||
> exp-use-copies-side-data-changeset = yes | > exp-use-copies-side-data-changeset = yes | ||||
> EOF | > EOF | ||||
#endif | #endif | ||||
#if pull | #if pull | ||||
$ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
> [format] | > [format] | ||||
> exp-use-side-data = yes | |||||
> exp-use-copies-side-data-changeset = yes | > exp-use-copies-side-data-changeset = yes | ||||
> EOF | > EOF | ||||
#endif | #endif | ||||
#if push | #if push | ||||
$ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
> [format] | > [format] | ||||
> exp-use-side-data = yes | |||||
> exp-use-copies-side-data-changeset = yes | > exp-use-copies-side-data-changeset = yes | ||||
> EOF | > EOF | ||||
#endif | #endif | ||||
#if pull-upgrade | #if pull-upgrade | ||||
$ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
> [format] | > [format] | ||||
> exp-use-side-data = no | |||||
> exp-use-copies-side-data-changeset = no | > exp-use-copies-side-data-changeset = no | ||||
> [experimental] | > [experimental] | ||||
> changegroup4 = yes | > changegroup4 = yes | ||||
> EOF | > EOF | ||||
#endif | #endif | ||||
#if push-upgrade | #if push-upgrade | ||||
$ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
> [format] | > [format] | ||||
> exp-use-side-data = no | |||||
> exp-use-copies-side-data-changeset = no | > exp-use-copies-side-data-changeset = no | ||||
> [experimental] | > [experimental] | ||||
> changegroup4 = yes | > changegroup4 = yes | ||||
> EOF | > EOF | ||||
#endif | #endif | ||||
$ cat > same-content.txt << EOF | $ cat > same-content.txt << EOF | ||||
> Here is some content that will be the same accros multiple file. | > Here is some content that will be the same accros multiple file. | ||||
We upgrade a repository that is not using sidedata (the filelog case) and | We upgrade a repository that is not using sidedata (the filelog case) and | ||||
check that the same side data have been generated as if they were computed at | check that the same side data have been generated as if they were computed at | ||||
commit time. | commit time. | ||||
#if upgraded | #if upgraded | ||||
$ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
> [format] | > [format] | ||||
> exp-use-side-data = yes | |||||
> exp-use-copies-side-data-changeset = yes | > exp-use-copies-side-data-changeset = yes | ||||
> EOF | > EOF | ||||
$ hg debugformat -v | $ hg debugformat -v | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
share-safe: no no no | share-safe: no no no | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
#endif | #endif | ||||
#if upgraded-parallel | #if upgraded-parallel | ||||
$ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
> [format] | > [format] | ||||
> exp-use-side-data = yes | |||||
> exp-use-copies-side-data-changeset = yes | > exp-use-copies-side-data-changeset = yes | ||||
> [experimental] | > [experimental] | ||||
> worker.repository-upgrade=yes | > worker.repository-upgrade=yes | ||||
> [worker] | > [worker] | ||||
> enabled=yes | > enabled=yes | ||||
> numcpus=8 | > numcpus=8 | ||||
> EOF | > EOF | ||||
$ hg debugformat -v | $ hg debugformat -v | ||||
added 80 changesets with 44 changes to 25 files (+39 heads) | added 80 changesets with 44 changes to 25 files (+39 heads) | ||||
new changesets a3a31bbefea6:908ce9259ffa | new changesets a3a31bbefea6:908ce9259ffa | ||||
(run 'hg heads' to see heads, 'hg merge' to merge) | (run 'hg heads' to see heads, 'hg merge' to merge) | ||||
#endif | #endif | ||||
#if pull-upgrade | #if pull-upgrade | ||||
$ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
> [format] | > [format] | ||||
> exp-use-side-data = yes | |||||
> exp-use-copies-side-data-changeset = yes | > exp-use-copies-side-data-changeset = yes | ||||
> [experimental] | > [experimental] | ||||
> changegroup4 = yes | > changegroup4 = yes | ||||
> EOF | > EOF | ||||
$ cd .. | $ cd .. | ||||
$ mv repo-chain repo-source | $ mv repo-chain repo-source | ||||
$ hg init repo-chain | $ hg init repo-chain | ||||
$ cd repo-chain | $ cd repo-chain | ||||
adding file changes | adding file changes | ||||
added 80 changesets with 44 changes to 25 files (+39 heads) | added 80 changesets with 44 changes to 25 files (+39 heads) | ||||
$ cd ../repo-chain | $ cd ../repo-chain | ||||
#endif | #endif | ||||
#if push-upgrade | #if push-upgrade | ||||
$ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
> [format] | > [format] | ||||
> exp-use-side-data = yes | |||||
> exp-use-copies-side-data-changeset = yes | > exp-use-copies-side-data-changeset = yes | ||||
> [experimental] | > [experimental] | ||||
> changegroup4 = yes | > changegroup4 = yes | ||||
> EOF | > EOF | ||||
$ cd .. | $ cd .. | ||||
$ mv repo-chain repo-source | $ mv repo-chain repo-source | ||||
$ hg init repo-chain | $ hg init repo-chain | ||||
$ cd repo-source | $ cd repo-source |
1 sidedata entries | 1 sidedata entries | ||||
entry-0014 size 14 | entry-0014 size 14 | ||||
$ hg debugsidedata -c -- 1 | $ hg debugsidedata -c -- 1 | ||||
1 sidedata entries | 1 sidedata entries | ||||
entry-0014 size 14 | entry-0014 size 14 | ||||
$ hg debugsidedata -m -- 0 | $ hg debugsidedata -m -- 0 | ||||
$ cat << EOF > .hg/hgrc | $ cat << EOF > .hg/hgrc | ||||
> [format] | > [format] | ||||
> exp-use-side-data = yes | |||||
> exp-use-copies-side-data-changeset = no | > exp-use-copies-side-data-changeset = no | ||||
> [experimental] | |||||
> revlogv2 = enable-unstable-format-and-corrupt-my-data | |||||
> EOF | > EOF | ||||
$ hg debugupgraderepo --run --quiet --no-backup > /dev/null | $ hg debugupgraderepo --run --quiet --no-backup > /dev/null | ||||
$ hg debugformat -v | $ hg debugformat -v | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
share-safe: no no no | share-safe: no no no |
=========================== | =========================== | ||||
Tests for sidedata exchange | Tests for sidedata exchange | ||||
=========================== | =========================== | ||||
Check simple exchange behavior | Check simple exchange behavior | ||||
============================== | ============================== | ||||
Pusher and pushed have sidedata enabled | 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 | $ cat << EOF >> sidedata-source/.hg/hgrc | ||||
> [extensions] | > [extensions] | ||||
> testsidedata=$TESTDIR/testlib/ext-sidedata-5.py | > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py | ||||
> EOF | > 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 | $ cat << EOF >> sidedata-target/.hg/hgrc | ||||
> [extensions] | > [extensions] | ||||
> testsidedata=$TESTDIR/testlib/ext-sidedata-5.py | > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py | ||||
> EOF | > EOF | ||||
$ cd sidedata-source | $ cd sidedata-source | ||||
$ echo a > a | $ echo a > a | ||||
$ echo b > b | $ echo b > b | ||||
$ echo c > c | $ echo c > c | ||||
entry-0002 size 32 | entry-0002 size 32 | ||||
'\xd9\xcd\x81UvL5C\xf1\x0f\xad\x8aH\rt17Fo\x8dU!<\x8e\xae\xfc\xd1/\x06\xd4:\x80' | '\xd9\xcd\x81UvL5C\xf1\x0f\xad\x8aH\rt17Fo\x8dU!<\x8e\xae\xfc\xd1/\x06\xd4:\x80' | ||||
$ cd .. | $ cd .. | ||||
Puller and pulled have sidedata enabled | Puller and pulled have sidedata enabled | ||||
--------------------------------------- | --------------------------------------- | ||||
$ rm -rf sidedata-source sidedata-target | $ 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 | $ cat << EOF >> sidedata-source/.hg/hgrc | ||||
> [extensions] | > [extensions] | ||||
> testsidedata=$TESTDIR/testlib/ext-sidedata-5.py | > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py | ||||
> EOF | > 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 | $ cat << EOF >> sidedata-target/.hg/hgrc | ||||
> [extensions] | > [extensions] | ||||
> testsidedata=$TESTDIR/testlib/ext-sidedata-5.py | > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py | ||||
> EOF | > EOF | ||||
$ cd sidedata-source | $ cd sidedata-source | ||||
$ echo a > a | $ echo a > a | ||||
$ echo b > b | $ echo b > b | ||||
$ echo c > c | $ echo c > c | ||||
$ cd .. | $ cd .. | ||||
Now on to asymmetric configs. | Now on to asymmetric configs. | ||||
Pusher has sidedata enabled, pushed does not | Pusher has sidedata enabled, pushed does not | ||||
-------------------------------------------- | -------------------------------------------- | ||||
$ rm -rf sidedata-source sidedata-target | $ 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 | $ cat << EOF >> sidedata-source/.hg/hgrc | ||||
> [extensions] | > [extensions] | ||||
> testsidedata=$TESTDIR/testlib/ext-sidedata-5.py | > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py | ||||
> EOF | > EOF | ||||
$ hg init sidedata-target --config format.exp-use-side-data=no | $ hg init sidedata-target --config experimental.revlogv2=no | ||||
$ cd sidedata-source | $ cd sidedata-source | ||||
$ echo a > a | $ echo a > a | ||||
$ echo b > b | $ echo b > b | ||||
$ echo c > c | $ echo c > c | ||||
$ hg commit -Am "initial" | $ hg commit -Am "initial" | ||||
adding a | adding a | ||||
adding b | adding b | ||||
adding c | adding c | ||||
$ hg -R ../sidedata-target debugsidedata a 0 | $ hg -R ../sidedata-target debugsidedata a 0 | ||||
$ hg -R ../sidedata-target debugsidedata a 1 -v | $ hg -R ../sidedata-target debugsidedata a 1 -v | ||||
$ cd .. | $ cd .. | ||||
Pulled has sidedata enabled, puller does not | Pulled has sidedata enabled, puller does not | ||||
-------------------------------------------- | -------------------------------------------- | ||||
$ rm -rf sidedata-source sidedata-target | $ 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 | $ cat << EOF >> sidedata-source/.hg/hgrc | ||||
> [extensions] | > [extensions] | ||||
> testsidedata=$TESTDIR/testlib/ext-sidedata-5.py | > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py | ||||
> EOF | > EOF | ||||
$ hg init sidedata-target --config format.exp-use-side-data=no | $ hg init sidedata-target --config experimental.revlogv2=no | ||||
$ cd sidedata-source | $ cd sidedata-source | ||||
$ echo a > a | $ echo a > a | ||||
$ echo b > b | $ echo b > b | ||||
$ echo c > c | $ echo c > c | ||||
$ hg commit -Am "initial" | $ hg commit -Am "initial" | ||||
adding a | adding a | ||||
adding b | adding b | ||||
adding c | adding c | ||||
Check sidedata exchange with on-the-fly generation and removal | Check sidedata exchange with on-the-fly generation and removal | ||||
============================================================== | ============================================================== | ||||
(Push) Target has strict superset of the source | (Push) Target has strict superset of the source | ||||
----------------------------------------------- | ----------------------------------------------- | ||||
$ 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 | ||||
$ 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 | $ cat << EOF >> target-repo/.hg/hgrc | ||||
> [extensions] | > [extensions] | ||||
> testsidedata=$TESTDIR/testlib/ext-sidedata.py | > testsidedata=$TESTDIR/testlib/ext-sidedata.py | ||||
> EOF | > EOF | ||||
$ cd source-repo | $ cd source-repo | ||||
$ echo aaa > a | $ echo aaa > a | ||||
$ hg add a | $ hg add a | ||||
$ hg commit -m a | $ hg commit -m a | ||||
(Push) Difference is not subset/superset | (Push) Difference is not subset/superset | ||||
---------------------------------------- | ---------------------------------------- | ||||
Source has one in common, one missing and one more sidedata category with the | Source has one in common, one missing and one more sidedata category with the | ||||
target. | target. | ||||
$ rm -rf source-repo target-repo | $ 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 | $ cat << EOF >> source-repo/.hg/hgrc | ||||
> [extensions] | > [extensions] | ||||
> testsidedata3=$TESTDIR/testlib/ext-sidedata-3.py | > testsidedata3=$TESTDIR/testlib/ext-sidedata-3.py | ||||
> EOF | > 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 | $ cat << EOF >> target-repo/.hg/hgrc | ||||
> [extensions] | > [extensions] | ||||
> testsidedata4=$TESTDIR/testlib/ext-sidedata-4.py | > testsidedata4=$TESTDIR/testlib/ext-sidedata-4.py | ||||
> EOF | > EOF | ||||
$ cd source-repo | $ cd source-repo | ||||
$ echo aaa > a | $ echo aaa > a | ||||
$ hg add a | $ hg add a | ||||
$ hg commit -m a | $ hg commit -m a | ||||
entry-0002 size 32 | entry-0002 size 32 | ||||
entry-0003 size 48 | entry-0003 size 48 | ||||
$ cd .. | $ cd .. | ||||
(Pull) Target has strict superset of the source | (Pull) Target has strict superset of the source | ||||
----------------------------------------------- | ----------------------------------------------- | ||||
$ rm -rf source-repo target-repo | $ 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 | ||||
$ 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 | $ cat << EOF >> target-repo/.hg/hgrc | ||||
> [extensions] | > [extensions] | ||||
> testsidedata=$TESTDIR/testlib/ext-sidedata.py | > testsidedata=$TESTDIR/testlib/ext-sidedata.py | ||||
> EOF | > EOF | ||||
$ cd source-repo | $ cd source-repo | ||||
$ echo aaa > a | $ echo aaa > a | ||||
$ hg add a | $ hg add a | ||||
$ hg commit -m a | $ hg commit -m a |
========================================================== | ========================================================== | ||||
Test file dedicated to checking side-data related behavior | Test file dedicated to checking side-data related behavior | ||||
========================================================== | ========================================================== | ||||
Check data can be written/read from sidedata | Check data can be written/read from sidedata | ||||
============================================ | ============================================ | ||||
$ cat << EOF >> $HGRCPATH | $ cat << EOF >> $HGRCPATH | ||||
> [extensions] | > [extensions] | ||||
> testsidedata=$TESTDIR/testlib/ext-sidedata.py | > testsidedata=$TESTDIR/testlib/ext-sidedata.py | ||||
> EOF | > 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 | $ cd test-sidedata | ||||
$ echo aaa > a | $ echo aaa > a | ||||
$ hg add a | $ hg add a | ||||
$ hg commit -m a --traceback | $ hg commit -m a --traceback | ||||
$ echo aaa > b | $ echo aaa > b | ||||
$ hg add b | $ hg add b | ||||
$ hg commit -m b | $ hg commit -m b | ||||
$ echo xxx >> a | $ echo xxx >> a | ||||
Check upgrade behavior | Check upgrade behavior | ||||
====================== | ====================== | ||||
Right now, sidedata has not upgrade support | Right now, sidedata has not upgrade support | ||||
Check that we can upgrade to sidedata | 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 | $ hg debugformat -v -R up-no-side-data | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
share-safe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
persistent-nodemap: no no no (no-rust !) | persistent-nodemap: no no no (no-rust !) | ||||
persistent-nodemap: yes yes no (rust !) | persistent-nodemap: yes yes no (rust !) | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
revlog-v2: no no no | revlog-v2: no no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib (no-zstd !) | compression: zlib zlib zlib (no-zstd !) | ||||
compression: zstd zstd zstd (zstd !) | compression: zstd zstd zstd (zstd !) | ||||
compression-level: default default default | 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 | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
share-safe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
persistent-nodemap: no no no (no-rust !) | persistent-nodemap: no no no (no-rust !) | ||||
persistent-nodemap: yes yes no (rust !) | persistent-nodemap: yes yes no (rust !) | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
revlog-v2: no yes no | revlog-v2: no yes no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib (no-zstd !) | compression: zlib zlib zlib (no-zstd !) | ||||
compression: zstd zstd zstd (zstd !) | compression: zstd zstd zstd (zstd !) | ||||
compression-level: default default default | 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 | 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 | $ hg debugformat -v -R up-side-data | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
share-safe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
persistent-nodemap: no no no (no-rust !) | persistent-nodemap: no no no (no-rust !) | ||||
persistent-nodemap: yes yes no (rust !) | persistent-nodemap: yes yes no (rust !) | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
revlog-v2: yes no no | revlog-v2: yes no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib (no-zstd !) | compression: zlib zlib zlib (no-zstd !) | ||||
compression: zstd zstd zstd (zstd !) | compression: zstd zstd zstd (zstd !) | ||||
compression-level: default default default | 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 | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
share-safe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
persistent-nodemap: no no no (no-rust !) | persistent-nodemap: no no no (no-rust !) | ||||
persistent-nodemap: yes yes no (rust !) | persistent-nodemap: yes yes no (rust !) | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
revlog-v2: yes no no | revlog-v2: yes no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib (no-zstd !) | compression: zlib zlib zlib (no-zstd !) | ||||
compression: zstd zstd zstd (zstd !) | compression: zstd zstd zstd (zstd !) | ||||
compression-level: default default default | 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 |
persistent-nodemap (rust !) | persistent-nodemap (rust !) | ||||
revlog-compression-zstd | revlog-compression-zstd | ||||
revlogv1 | revlogv1 | ||||
sparserevlog | sparserevlog | ||||
store | store | ||||
#endif | #endif | ||||
Check upgrading to a side-data revlog | Check upgrading to a revlog format supporting sidedata | ||||
------------------------------------- | ------------------------------------------------------ | ||||
upgrade | upgrade | ||||
$ hg debugsidedata -c 0 | $ 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: | upgrade will perform the following actions: | ||||
requirements | requirements | ||||
preserved: dotencode, fncache, generaldelta, store (no-zstd !) | preserved: dotencode, fncache, generaldelta, store (no-zstd !) | ||||
preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd no-rust !) | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd no-rust !) | ||||
preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, sparserevlog, store (rust !) | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, sparserevlog, store (rust !) | ||||
removed: revlogv1 | removed: revlogv1 | ||||
added: exp-revlogv2.2, exp-sidedata-flag (zstd !) | added: exp-revlogv2.2 (zstd !) | ||||
added: exp-revlogv2.2, exp-sidedata-flag, sparserevlog (no-zstd !) | added: exp-revlogv2.2, sparserevlog (no-zstd !) | ||||
processed revlogs: | processed revlogs: | ||||
- all-filelogs | - all-filelogs | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
$ hg debugformat -v | $ hg debugformat -v | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
share-safe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
persistent-nodemap: no no no (no-rust !) | persistent-nodemap: no no no (no-rust !) | ||||
persistent-nodemap: yes yes no (rust !) | persistent-nodemap: yes yes no (rust !) | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
revlog-v2: yes no no | revlog-v2: yes no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib (no-zstd !) | compression: zlib zlib zlib (no-zstd !) | ||||
compression: zstd zstd zstd (zstd !) | compression: zstd zstd zstd (zstd !) | ||||
compression-level: default default default | compression-level: default default default | ||||
$ cat .hg/requires | $ cat .hg/requires | ||||
dotencode | dotencode | ||||
exp-revlogv2.2 | exp-revlogv2.2 | ||||
exp-sidedata-flag | |||||
fncache | fncache | ||||
generaldelta | generaldelta | ||||
persistent-nodemap (rust !) | persistent-nodemap (rust !) | ||||
revlog-compression-zstd (zstd !) | revlog-compression-zstd (zstd !) | ||||
sparserevlog | sparserevlog | ||||
store | store | ||||
$ hg debugsidedata -c 0 | $ hg debugsidedata -c 0 | ||||
2 sidedata entries | 2 sidedata entries | ||||
entry-0001 size 4 | entry-0001 size 4 | ||||
entry-0002 size 32 | entry-0002 size 32 | ||||
downgrade | 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: | upgrade will perform the following actions: | ||||
requirements | requirements | ||||
preserved: dotencode, fncache, generaldelta, sparserevlog, store (no-zstd !) | preserved: dotencode, fncache, generaldelta, sparserevlog, store (no-zstd !) | ||||
preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd no-rust !) | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd no-rust !) | ||||
preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, sparserevlog, store (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 | added: revlogv1 | ||||
processed revlogs: | processed revlogs: | ||||
- all-filelogs | - all-filelogs | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
$ hg debugformat -v | $ hg debugformat -v | ||||
revlogv1 | revlogv1 | ||||
sparserevlog | sparserevlog | ||||
store | store | ||||
$ hg debugsidedata -c 0 | $ hg debugsidedata -c 0 | ||||
upgrade from hgrc | upgrade from hgrc | ||||
$ cat >> .hg/hgrc << EOF | $ cat >> .hg/hgrc << EOF | ||||
> [format] | > [experimental] | ||||
> exp-use-side-data=yes | > revlogv2=enable-unstable-format-and-corrupt-my-data | ||||
> EOF | > EOF | ||||
$ hg debugupgraderepo --run --no-backup --quiet | $ hg debugupgraderepo --run --no-backup --quiet | ||||
upgrade will perform the following actions: | upgrade will perform the following actions: | ||||
requirements | requirements | ||||
preserved: dotencode, fncache, generaldelta, sparserevlog, store (no-zstd !) | preserved: dotencode, fncache, generaldelta, sparserevlog, store (no-zstd !) | ||||
preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd no-rust !) | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd no-rust !) | ||||
preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, sparserevlog, store (rust !) | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, sparserevlog, store (rust !) | ||||
removed: revlogv1 | removed: revlogv1 | ||||
added: exp-revlogv2.2, exp-sidedata-flag | added: exp-revlogv2.2 | ||||
processed revlogs: | processed revlogs: | ||||
- all-filelogs | - all-filelogs | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
$ hg debugformat -v | $ hg debugformat -v | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
share-safe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
persistent-nodemap: no no no (no-rust !) | persistent-nodemap: no no no (no-rust !) | ||||
persistent-nodemap: yes yes no (rust !) | persistent-nodemap: yes yes no (rust !) | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
revlog-v2: yes yes no | revlog-v2: yes yes no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib (no-zstd !) | compression: zlib zlib zlib (no-zstd !) | ||||
compression: zstd zstd zstd (zstd !) | compression: zstd zstd zstd (zstd !) | ||||
compression-level: default default default | compression-level: default default default | ||||
$ cat .hg/requires | $ cat .hg/requires | ||||
dotencode | dotencode | ||||
exp-revlogv2.2 | exp-revlogv2.2 | ||||
exp-sidedata-flag | |||||
fncache | fncache | ||||
generaldelta | generaldelta | ||||
persistent-nodemap (rust !) | persistent-nodemap (rust !) | ||||
revlog-compression-zstd (zstd !) | revlog-compression-zstd (zstd !) | ||||
sparserevlog | sparserevlog | ||||
store | store | ||||
$ hg debugsidedata -c 0 | $ hg debugsidedata -c 0 | ||||
Demonstrate that nothing to perform upgrade will still run all the way through | Demonstrate that nothing to perform upgrade will still run all the way through | ||||
$ hg debugupgraderepo --run | $ hg debugupgraderepo --run | ||||
nothing to do | nothing to do |