2019-05-28 13:12:27 +03:00
|
|
|
$ setconfig extensions.treemanifest=!
|
2015-10-18 20:04:29 +03:00
|
|
|
$ cat << EOF >> $HGRCPATH
|
2017-11-12 17:34:46 +03:00
|
|
|
> [ui]
|
|
|
|
> interactive=yes
|
2015-10-18 20:04:29 +03:00
|
|
|
> [format]
|
|
|
|
> usegeneraldelta=yes
|
|
|
|
> EOF
|
|
|
|
|
2012-07-11 13:52:42 +04:00
|
|
|
$ hg init debugrevlog
|
|
|
|
$ cd debugrevlog
|
|
|
|
$ echo a > a
|
|
|
|
$ hg ci -Am adda
|
|
|
|
adding a
|
|
|
|
$ hg debugrevlog -m
|
|
|
|
format : 1
|
2015-10-18 20:04:29 +03:00
|
|
|
flags : inline, generaldelta
|
2012-07-11 13:52:42 +04:00
|
|
|
|
|
|
|
revisions : 1
|
|
|
|
merges : 0 ( 0.00%)
|
|
|
|
normal : 1 (100.00%)
|
|
|
|
revisions : 1
|
|
|
|
full : 1 (100.00%)
|
|
|
|
deltas : 0 ( 0.00%)
|
|
|
|
revision size : 44
|
|
|
|
full : 44 (100.00%)
|
|
|
|
deltas : 0 ( 0.00%)
|
2016-11-18 07:30:00 +03:00
|
|
|
|
|
|
|
chunks : 1
|
|
|
|
0x75 (u) : 1 (100.00%)
|
|
|
|
chunks size : 44
|
|
|
|
0x75 (u) : 44 (100.00%)
|
2012-07-11 13:52:42 +04:00
|
|
|
|
2017-06-26 16:27:34 +03:00
|
|
|
avg chain length : 0
|
|
|
|
max chain length : 0
|
|
|
|
max chain reach : 44
|
|
|
|
compression ratio : 0
|
2012-07-11 13:52:42 +04:00
|
|
|
|
|
|
|
uncompressed data size (min/max/avg) : 43 / 43 / 43
|
|
|
|
full revision size (min/max/avg) : 44 / 44 / 44
|
|
|
|
delta size (min/max/avg) : 0 / 0 / 0
|
2014-01-13 02:28:21 +04:00
|
|
|
|
2014-12-14 00:56:05 +03:00
|
|
|
Test debugindex, with and without the --debug flag
|
|
|
|
$ hg debugindex a
|
2015-10-18 20:04:29 +03:00
|
|
|
rev offset length ..... linkrev nodeid p1 p2 (re)
|
2014-12-14 00:56:05 +03:00
|
|
|
0 0 3 .... 0 b789fdd96dc2 000000000000 000000000000 (re)
|
|
|
|
$ hg --debug debugindex a
|
2015-10-18 20:04:29 +03:00
|
|
|
rev offset length ..... linkrev nodeid p1 p2 (re)
|
2014-12-14 00:56:05 +03:00
|
|
|
0 0 3 .... 0 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 (re)
|
|
|
|
$ hg debugindex -f 1 a
|
2015-10-18 20:04:29 +03:00
|
|
|
rev flag offset length size ..... link p1 p2 nodeid (re)
|
2014-12-14 00:56:05 +03:00
|
|
|
0 0000 0 3 2 .... 0 -1 -1 b789fdd96dc2 (re)
|
|
|
|
$ hg --debug debugindex -f 1 a
|
2015-10-18 20:04:29 +03:00
|
|
|
rev flag offset length size ..... link p1 p2 nodeid (re)
|
2014-12-14 00:56:05 +03:00
|
|
|
0 0000 0 3 2 .... 0 -1 -1 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 (re)
|
|
|
|
|
2015-12-06 10:37:46 +03:00
|
|
|
debugdelta chain basic output
|
|
|
|
|
|
|
|
$ hg debugdeltachain -m
|
|
|
|
rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
|
|
|
|
0 1 1 -1 base 44 43 44 1.02326 44 0 0.00000
|
|
|
|
|
|
|
|
$ hg debugdeltachain -m -T '{rev} {chainid} {chainlen}\n'
|
|
|
|
0 1 1
|
|
|
|
|
|
|
|
$ hg debugdeltachain -m -Tjson
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"chainid": 1,
|
|
|
|
"chainlen": 1,
|
|
|
|
"chainratio": 1.02325581395,
|
|
|
|
"chainsize": 44,
|
|
|
|
"compsize": 44,
|
|
|
|
"deltatype": "base",
|
|
|
|
"extradist": 0,
|
|
|
|
"extraratio": 0.0,
|
|
|
|
"lindist": 44,
|
|
|
|
"prevrev": -1,
|
|
|
|
"rev": 0,
|
|
|
|
"uncompsize": 43
|
|
|
|
}
|
|
|
|
]
|
2014-12-14 00:56:05 +03:00
|
|
|
|
2017-10-26 10:27:09 +03:00
|
|
|
debugdelta chain with sparse read enabled
|
|
|
|
|
|
|
|
$ cat >> $HGRCPATH <<EOF
|
|
|
|
> [experimental]
|
|
|
|
> sparse-read = True
|
|
|
|
> EOF
|
|
|
|
$ hg debugdeltachain -m
|
|
|
|
rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity
|
|
|
|
0 1 1 -1 base 44 43 44 1.02326 44 0 0.00000 44 44 1.00000
|
|
|
|
|
|
|
|
$ hg debugdeltachain -m -T '{rev} {chainid} {chainlen} {readsize} {largestblock} {readdensity}\n'
|
|
|
|
0 1 1 44 44 1.0
|
|
|
|
|
|
|
|
$ hg debugdeltachain -m -Tjson
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"chainid": 1,
|
|
|
|
"chainlen": 1,
|
|
|
|
"chainratio": 1.02325581395,
|
|
|
|
"chainsize": 44,
|
|
|
|
"compsize": 44,
|
|
|
|
"deltatype": "base",
|
|
|
|
"extradist": 0,
|
|
|
|
"extraratio": 0.0,
|
|
|
|
"largestblock": 44,
|
|
|
|
"lindist": 44,
|
|
|
|
"prevrev": -1,
|
|
|
|
"readdensity": 1.0,
|
|
|
|
"readsize": 44,
|
|
|
|
"rev": 0,
|
|
|
|
"uncompsize": 43
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
2014-11-07 01:20:05 +03:00
|
|
|
Test max chain len
|
|
|
|
$ cat >> $HGRCPATH << EOF
|
2014-11-11 18:35:06 +03:00
|
|
|
> [format]
|
2014-11-07 01:20:05 +03:00
|
|
|
> maxchainlen=4
|
|
|
|
> EOF
|
|
|
|
|
2014-11-11 18:35:06 +03:00
|
|
|
$ printf "This test checks if maxchainlen config value is respected also it can serve as basic test for debugrevlog -d <file>.\n" >> a
|
2014-11-07 01:20:05 +03:00
|
|
|
$ hg ci -m a
|
2014-11-11 18:35:06 +03:00
|
|
|
$ printf "b\n" >> a
|
2014-11-07 01:20:05 +03:00
|
|
|
$ hg ci -m a
|
2014-11-11 18:35:06 +03:00
|
|
|
$ printf "c\n" >> a
|
2014-11-07 01:20:05 +03:00
|
|
|
$ hg ci -m a
|
2014-11-11 18:35:06 +03:00
|
|
|
$ printf "d\n" >> a
|
2014-11-07 01:20:05 +03:00
|
|
|
$ hg ci -m a
|
2014-11-11 18:35:06 +03:00
|
|
|
$ printf "e\n" >> a
|
2014-11-07 01:20:05 +03:00
|
|
|
$ hg ci -m a
|
2014-11-11 18:35:06 +03:00
|
|
|
$ printf "f\n" >> a
|
2014-11-07 01:20:05 +03:00
|
|
|
$ hg ci -m a
|
2014-11-11 18:35:06 +03:00
|
|
|
$ printf 'g\n' >> a
|
2014-11-07 01:20:05 +03:00
|
|
|
$ hg ci -m a
|
2014-11-11 18:35:06 +03:00
|
|
|
$ printf 'h\n' >> a
|
2014-11-07 01:20:05 +03:00
|
|
|
$ hg ci -m a
|
|
|
|
$ hg debugrevlog -d a
|
|
|
|
# rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen
|
|
|
|
0 -1 -1 0 ??? 0 0 0 0 ??? ???? ? 1 0 (glob)
|
|
|
|
1 0 -1 ??? ??? 0 0 0 0 ??? ???? ? 1 1 (glob)
|
|
|
|
2 1 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 2 (glob)
|
|
|
|
3 2 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 3 (glob)
|
|
|
|
4 3 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 4 (glob)
|
|
|
|
5 4 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 0 (glob)
|
|
|
|
6 5 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 1 (glob)
|
|
|
|
7 6 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 2 (glob)
|
|
|
|
8 7 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 3 (glob)
|
2017-05-02 22:35:06 +03:00
|
|
|
|
2017-11-12 17:34:19 +03:00
|
|
|
Test debuglocks command:
|
|
|
|
|
|
|
|
$ hg debuglocks
|
2018-04-18 03:16:48 +03:00
|
|
|
lock: free
|
|
|
|
wlock: free
|
2019-04-29 14:31:28 +03:00
|
|
|
undolog/lock: absent
|
|
|
|
prefetchlock: free
|
|
|
|
infinitepushbackup.lock: free
|
2017-11-12 17:34:19 +03:00
|
|
|
|
2016-08-20 16:37:58 +03:00
|
|
|
Test WdirUnsupported exception
|
|
|
|
|
|
|
|
$ hg debugdata -c ffffffffffffffffffffffffffffffffffffffff
|
|
|
|
abort: working directory revision cannot be specified
|
|
|
|
[255]
|
|
|
|
|
2017-05-02 22:35:06 +03:00
|
|
|
Test cache warming command
|
|
|
|
|
|
|
|
$ rm -rf .hg/cache/
|
|
|
|
$ hg debugupdatecaches --debug
|
2019-02-23 07:58:37 +03:00
|
|
|
$ [ -d .hg/cache/ ]
|
|
|
|
[1]
|
2017-05-02 22:35:06 +03:00
|
|
|
|
2014-11-07 01:20:05 +03:00
|
|
|
$ cd ..
|
2014-01-13 02:28:21 +04:00
|
|
|
|
2017-10-30 19:08:16 +03:00
|
|
|
Test debugcapabilities command:
|
|
|
|
|
|
|
|
$ hg debugcapabilities ./debugrevlog/
|
|
|
|
Main capabilities:
|
|
|
|
branchmap
|
2017-11-05 10:23:12 +03:00
|
|
|
$USUAL_BUNDLE2_CAPS$
|
2017-10-30 19:08:16 +03:00
|
|
|
getbundle
|
|
|
|
known
|
|
|
|
lookup
|
|
|
|
pushkey
|
|
|
|
unbundle
|
2017-10-30 19:09:29 +03:00
|
|
|
Bundle2 capabilities:
|
|
|
|
HG20
|
2017-11-13 06:22:45 +03:00
|
|
|
bookmarks
|
2017-10-30 19:09:29 +03:00
|
|
|
changegroup
|
|
|
|
01
|
|
|
|
02
|
|
|
|
digests
|
|
|
|
md5
|
|
|
|
sha1
|
|
|
|
sha512
|
|
|
|
error
|
|
|
|
abort
|
|
|
|
unsupportedcontent
|
|
|
|
pushraced
|
|
|
|
pushkey
|
|
|
|
hgtagsfnodes
|
|
|
|
listkeys
|
|
|
|
phases
|
|
|
|
heads
|
|
|
|
pushkey
|
|
|
|
remote-changegroup
|
|
|
|
http
|
|
|
|
https
|