##// END OF EJS Templates
revlog: subclass the new `repository.iverifyproblem` Protocol class...
revlog: subclass the new `repository.iverifyproblem` Protocol class This is the same transformation as 3a90a6fd710d did for dirstate, but the CamelCase naming was already cleaned up here. We shouldn't have to explicitly subclass, but I'm doing so to test the interplay of regular attributes and the `attrs` class. Also, PyCharm has a nifty feature that puts a jump point in the gutter to navigate back and forth between the base class and subclasses (and override functions and base class functions) when there's an explicit subclassing. Additionally, PyCharm will immediately flag signature mismatches without a 40m pytype run.

File last commit:

r53354:8dede0df default
r53365:4ef6dbc2 default
Show More
test-sidedata.t
86 lines | 4.2 KiB | text/troff | Tads3Lexer
upgrade: detect the side-data format variants...
r43299 ==========================================================
Test file dedicated to checking side-data related behavior
==========================================================
sidedata: test we can successfully write sidedata...
r43308 Check data can be written/read from sidedata
============================================
$ cat << EOF >> $HGRCPATH
> [extensions]
> testsidedata=$TESTDIR/testlib/ext-sidedata.py
> EOF
test: no longer directly use the sidedata config and requirements...
r48001 $ hg init test-sidedata --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
sidedata: test we can successfully write sidedata...
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
upgrade: detect the side-data format variants...
r43299
sidedata: add a debugsidedata command...
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
debugindex: introduce a concept of "verbose-only" column...
r50149 $ hg debug-revlog-index --verbose -c
debugindex: add a `rank` column
r50161 rev rank linkrev nodeid p1-rev p1-nodeid p2-rev p2-nodeid full-size delta-base flags comp-mode data-offset chunk-size sd-comp-mode sidedata-offset sd-chunk-size
0 -1 0 7049e48789d7 -1 000000000000 -1 000000000000 54 0 0 0 0 54 plain 0 90
1 -1 1 2707720c6597 0 7049e48789d7 -1 000000000000 54 1 0 0 54 54 plain 90 90
2 -1 2 40f977031323 1 2707720c6597 -1 000000000000 55 2 0 0 108 55 plain 180 90
debugindex: introduce a concept of "verbose-only" column...
r50149
$ hg debug-revlog-index --verbose -m
debugindex: add a `rank` column
r50161 rev rank linkrev nodeid p1-rev p1-nodeid p2-rev p2-nodeid full-size delta-base flags comp-mode data-offset chunk-size sd-comp-mode sidedata-offset sd-chunk-size
0 -1 0 b85d294330e3 -1 000000000000 -1 000000000000 43 0 0 0 0 43 plain 0 90
1 -1 1 1a0aec305c63 0 b85d294330e3 -1 000000000000 86 0 0 0 43 55 plain 90 90
2 -1 2 104258a4f75f 1 1a0aec305c63 -1 000000000000 86 1 0 0 98 55 plain 180 90
debugindex: introduce a concept of "verbose-only" column...
r50149
upgrade: detect the side-data format variants...
r43299 Check upgrade behavior
======================
Right now, sidedata has not upgrade support
upgrade: allow upgrade to repository using sidedata...
r43404 Check that we can upgrade to sidedata
-------------------------------------
upgrade: detect the side-data format variants...
r43299
test: no longer directly use the sidedata config and requirements...
r48001 $ hg init up-no-side-data --config experimental.revlogv2=no
format: add pattern filtering to debugformat...
r53354 $ hg debugformat -v -R up-no-side-data changelog-v2 revlog-v2
format-variant repo config default
Raphaël Gomès
revlogv2: allow upgrading to v2...
r47439 revlog-v2: no no no
changelogv2: introduce a "changelogv2" feature...
r48037 changelog-v2: no no no
format: add pattern filtering to debugformat...
r53354 $ hg debugformat -v -R up-no-side-data --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data changelog-v2 revlog-v2
format-variant repo config default
Raphaël Gomès
revlogv2: allow upgrading to v2...
r47439 revlog-v2: no yes no
changelogv2: introduce a "changelogv2" feature...
r48037 changelog-v2: no no no
test: no longer directly use the sidedata config and requirements...
r48001 $ hg debugupgraderepo -R up-no-side-data --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data > /dev/null
upgrade: detect the side-data format variants...
r43299
upgrade: allow for `sidedata` removal...
r43405 Check that we can downgrade from sidedata
-----------------------------------------
upgrade: detect the side-data format variants...
r43299
test: no longer directly use the sidedata config and requirements...
r48001 $ hg init up-side-data --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
format: add pattern filtering to debugformat...
r53354 $ hg debugformat -v -R up-side-data changelog-v2 revlog-v2
format-variant repo config default
Raphaël Gomès
revlogv2: allow upgrading to v2...
r47439 revlog-v2: yes no no
changelogv2: introduce a "changelogv2" feature...
r48037 changelog-v2: no no no
format: add pattern filtering to debugformat...
r53354 $ hg debugformat -v -R up-side-data --config experimental.revlogv2=no changelog-v2 revlog-v2
format-variant repo config default
Raphaël Gomès
revlogv2: allow upgrading to v2...
r47439 revlog-v2: yes no no
changelogv2: introduce a "changelogv2" feature...
r48037 changelog-v2: no no no
test: no longer directly use the sidedata config and requirements...
r48001 $ hg debugupgraderepo -R up-side-data --config experimental.revlogv2=no > /dev/null