##// 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:

r51574:47b44d80 default
r53365:4ef6dbc2 default
Show More
test-debug-revlog-stats.t
75 lines | 2.1 KiB | text/troff | Tads3Lexer
/ tests / test-debug-revlog-stats.t
Force revlog max inline value to be smaller than default
$ mkdir $TESTTMP/ext
$ cat << EOF > $TESTTMP/ext/small_inline.py
> from mercurial import revlog
> revlog._maxinline = 8
> EOF
$ cat << EOF >> $HGRCPATH
> [extensions]
> small_inline=$TESTTMP/ext/small_inline.py
> EOF
$ hg init repo
$ cd repo
Try on an empty repository
$ hg debug-revlog-stats
rev-count data-size inl type target
$ mkdir folder
$ touch a b folder/c folder/d
$ hg commit -Aqm 0
$ echo "text" > a
$ hg rm b
$ echo "longer string" > folder/d
$ hg commit -Aqm 1
Differences in data size observed with pure is due to different compression
algorithms
$ hg debug-revlog-stats
rev-count data-size inl type target
2 138 no changelog (no-pure !)
2 137 no changelog (pure !)
2 177 no manifest (no-pure !)
2 168 no manifest (pure !)
2 6 yes file a
1 0 yes file b
1 0 yes file folder/c
2 15 no file folder/d
Test 'changelog' command argument
$ hg debug-revlog-stats -c
rev-count data-size inl type target
2 138 no changelog (no-pure !)
2 137 no changelog (pure !)
Test 'manifest' command argument
$ hg debug-revlog-stats -m
rev-count data-size inl type target
2 177 no manifest (no-pure !)
2 168 no manifest (pure !)
Test 'file' command argument
$ hg debug-revlog-stats -f
rev-count data-size inl type target
2 6 yes file a
1 0 yes file b
1 0 yes file folder/c
2 15 no file folder/d
Test multiple command arguments
$ hg debug-revlog-stats -cm
rev-count data-size inl type target
2 138 no changelog (no-pure !)
2 137 no changelog (pure !)
2 177 no manifest (no-pure !)
2 168 no manifest (pure !)