Mercurial > hg
diff tests/test-copies-in-changeset.t @ 43148:843da18386d5
sidedatacopies: deal with upgrading and downgrading to that format
This is quite useful to test this on real life data.
Differential Revision: https://phab.mercurial-scm.org/D6955
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 06 Oct 2019 23:36:52 -0400 |
parents | beed7ce61681 |
children | bca9d1a6c4c5 |
line wrap: on
line diff
--- a/tests/test-copies-in-changeset.t Sun Oct 06 23:36:51 2019 -0400 +++ b/tests/test-copies-in-changeset.t Sun Oct 06 23:36:52 2019 -0400 @@ -450,4 +450,91 @@ $ hg ci -Aqm 'add a' $ hg mv a b $ hg ci -m 'remove a' a + +#if sidedata + +Test upgrading/downgrading to sidedata storage +============================================== + +downgrading (keeping some sidedata) + + $ hg debugformat -v + format-variant repo config default + fncache: yes yes yes + dotencode: yes yes yes + generaldelta: yes yes yes + sparserevlog: yes yes yes + sidedata: yes yes no + copies-sdc: yes yes no + plain-cl-delta: yes yes yes + compression: zlib zlib zlib + compression-level: default default default + $ hg debugsidedata -c -- 0 + 4 sidedata entries + entry-0010 size 0 + entry-0011 size 0 + entry-0012 size 1 + entry-0013 size 0 + $ hg debugsidedata -c -- 1 + 4 sidedata entries + entry-0010 size 0 + entry-0011 size 0 + entry-0012 size 0 + entry-0013 size 1 + $ hg debugsidedata -m -- 0 + $ cat << EOF > .hg/hgrc + > [format] + > use-side-data = yes + > exp-use-copies-side-data-changeset = no + > EOF + $ hg debugupgraderepo --run --quiet --no-backup > /dev/null + $ hg debugformat -v + format-variant repo config default + fncache: yes yes yes + dotencode: yes yes yes + generaldelta: yes yes yes + sparserevlog: yes yes yes + sidedata: yes yes no + copies-sdc: no no no + plain-cl-delta: yes yes yes + compression: zlib zlib zlib + compression-level: default default default + $ hg debugsidedata -c -- 0 + $ hg debugsidedata -c -- 1 + $ hg debugsidedata -m -- 0 + +upgrading + + $ cat << EOF > .hg/hgrc + > [format] + > exp-use-copies-side-data-changeset = yes + > EOF + $ hg debugupgraderepo --run --quiet --no-backup > /dev/null + $ hg debugformat -v + format-variant repo config default + fncache: yes yes yes + dotencode: yes yes yes + generaldelta: yes yes yes + sparserevlog: yes yes yes + sidedata: yes yes no + copies-sdc: yes yes no + plain-cl-delta: yes yes yes + compression: zlib zlib zlib + compression-level: default default default + $ hg debugsidedata -c -- 0 + 4 sidedata entries + entry-0010 size 0 + entry-0011 size 0 + entry-0012 size 1 + entry-0013 size 0 + $ hg debugsidedata -c -- 1 + 4 sidedata entries + entry-0010 size 0 + entry-0011 size 0 + entry-0012 size 0 + entry-0013 size 1 + $ hg debugsidedata -m -- 0 + +#endif + $ cd ..