test-sidedata.t
110 lines
| 3.8 KiB
| text/troff
|
Tads3Lexer
/ tests / test-sidedata.t
r43299 | ========================================================== | |||
Test file dedicated to checking side-data related behavior | ||||
========================================================== | ||||
r43308 | Check data can be written/read from sidedata | |||
============================================ | ||||
$ cat << EOF >> $HGRCPATH | ||||
> [extensions] | ||||
> testsidedata=$TESTDIR/testlib/ext-sidedata.py | ||||
> EOF | ||||
r43437 | $ hg init test-sidedata --config format.exp-use-side-data=yes | |||
r43308 | $ cd test-sidedata | |||
$ echo aaa > a | ||||
$ hg add a | ||||
$ hg commit -m a --traceback | ||||
$ echo aaa > b | ||||
$ hg add b | ||||
$ hg commit -m b | ||||
$ echo xxx >> a | ||||
$ hg commit -m aa | ||||
r43299 | ||||
r43309 | $ hg debugsidedata -c 0 | |||
2 sidedata entries | ||||
entry-0001 size 4 | ||||
entry-0002 size 32 | ||||
$ hg debugsidedata -c 1 -v | ||||
2 sidedata entries | ||||
entry-0001 size 4 | ||||
'\x00\x00\x006' | ||||
entry-0002 size 32 | ||||
'\x98\t\xf9\xc4v\xf0\xc5P\x90\xf7wRf\xe8\xe27e\xfc\xc1\x93\xa4\x96\xd0\x1d\x97\xaaG\x1d\xd7t\xfa\xde' | ||||
$ hg debugsidedata -m 2 | ||||
2 sidedata entries | ||||
entry-0001 size 4 | ||||
entry-0002 size 32 | ||||
$ hg debugsidedata a 1 | ||||
2 sidedata entries | ||||
entry-0001 size 4 | ||||
entry-0002 size 32 | ||||
r43299 | Check upgrade behavior | |||
====================== | ||||
Right now, sidedata has not upgrade support | ||||
r43404 | Check that we can upgrade to sidedata | |||
------------------------------------- | ||||
r43299 | ||||
r43437 | $ hg init up-no-side-data --config format.exp-use-side-data=no | |||
r43299 | $ hg debugformat -v -R up-no-side-data | |||
r45303 | format-variant repo config default | |||
fncache: yes yes yes | ||||
dotencode: yes yes yes | ||||
generaldelta: yes yes yes | ||||
|
r47055 | share-safe: no no no | ||
r45303 | sparserevlog: yes yes yes | |||
sidedata: no no no | ||||
persistent-nodemap: no no no | ||||
copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib | ||||
compression-level: default default default | ||||
r43437 | $ hg debugformat -v -R up-no-side-data --config format.exp-use-side-data=yes | |||
r45303 | format-variant repo config default | |||
fncache: yes yes yes | ||||
dotencode: yes yes yes | ||||
generaldelta: yes yes yes | ||||
|
r47055 | share-safe: no no no | ||
r45303 | sparserevlog: yes yes yes | |||
sidedata: no yes no | ||||
persistent-nodemap: no no no | ||||
copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib | ||||
compression-level: default default default | ||||
r43437 | $ hg debugupgraderepo -R up-no-side-data --config format.exp-use-side-data=yes > /dev/null | |||
r43299 | ||||
r43405 | Check that we can downgrade from sidedata | |||
----------------------------------------- | ||||
r43299 | ||||
r43437 | $ hg init up-side-data --config format.exp-use-side-data=yes | |||
r43299 | $ hg debugformat -v -R up-side-data | |||
r45303 | format-variant repo config default | |||
fncache: yes yes yes | ||||
dotencode: yes yes yes | ||||
generaldelta: yes yes yes | ||||
|
r47055 | share-safe: no no no | ||
r45303 | sparserevlog: yes yes yes | |||
sidedata: yes no no | ||||
persistent-nodemap: no no no | ||||
copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib | ||||
compression-level: default default default | ||||
r43437 | $ hg debugformat -v -R up-side-data --config format.exp-use-side-data=no | |||
r45303 | format-variant repo config default | |||
fncache: yes yes yes | ||||
dotencode: yes yes yes | ||||
generaldelta: yes yes yes | ||||
|
r47055 | share-safe: no no no | ||
r45303 | sparserevlog: yes yes yes | |||
sidedata: yes no no | ||||
persistent-nodemap: no no no | ||||
copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib | ||||
compression-level: default default default | ||||
r43437 | $ hg debugupgraderepo -R up-side-data --config format.exp-use-side-data=no > /dev/null | |||