##// END OF EJS Templates
commands.debugrevlog: report max chain length...
Gregory Szorc -
r24503:944749de default
parent child Browse files
Show More

The requested changes are too big and content was truncated. Show full diff

1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
@@ -1,96 +1,97 b''
1 $ hg init debugrevlog
1 $ hg init debugrevlog
2 $ cd debugrevlog
2 $ cd debugrevlog
3 $ echo a > a
3 $ echo a > a
4 $ hg ci -Am adda
4 $ hg ci -Am adda
5 adding a
5 adding a
6 $ hg debugrevlog -m
6 $ hg debugrevlog -m
7 format : 1
7 format : 1
8 flags : inline
8 flags : inline
9
9
10 revisions : 1
10 revisions : 1
11 merges : 0 ( 0.00%)
11 merges : 0 ( 0.00%)
12 normal : 1 (100.00%)
12 normal : 1 (100.00%)
13 revisions : 1
13 revisions : 1
14 full : 1 (100.00%)
14 full : 1 (100.00%)
15 deltas : 0 ( 0.00%)
15 deltas : 0 ( 0.00%)
16 revision size : 44
16 revision size : 44
17 full : 44 (100.00%)
17 full : 44 (100.00%)
18 deltas : 0 ( 0.00%)
18 deltas : 0 ( 0.00%)
19
19
20 avg chain length : 0
20 avg chain length : 0
21 max chain length : 0
21 compression ratio : 0
22 compression ratio : 0
22
23
23 uncompressed data size (min/max/avg) : 43 / 43 / 43
24 uncompressed data size (min/max/avg) : 43 / 43 / 43
24 full revision size (min/max/avg) : 44 / 44 / 44
25 full revision size (min/max/avg) : 44 / 44 / 44
25 delta size (min/max/avg) : 0 / 0 / 0
26 delta size (min/max/avg) : 0 / 0 / 0
26
27
27 Test debugindex, with and without the --debug flag
28 Test debugindex, with and without the --debug flag
28 $ hg debugindex a
29 $ hg debugindex a
29 rev offset length .... linkrev nodeid p1 p2 (re)
30 rev offset length .... linkrev nodeid p1 p2 (re)
30 0 0 3 .... 0 b789fdd96dc2 000000000000 000000000000 (re)
31 0 0 3 .... 0 b789fdd96dc2 000000000000 000000000000 (re)
31 $ hg --debug debugindex a
32 $ hg --debug debugindex a
32 rev offset length .... linkrev nodeid p1 p2 (re)
33 rev offset length .... linkrev nodeid p1 p2 (re)
33 0 0 3 .... 0 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 (re)
34 0 0 3 .... 0 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 (re)
34 $ hg debugindex -f 1 a
35 $ hg debugindex -f 1 a
35 rev flag offset length size .... link p1 p2 nodeid (re)
36 rev flag offset length size .... link p1 p2 nodeid (re)
36 0 0000 0 3 2 .... 0 -1 -1 b789fdd96dc2 (re)
37 0 0000 0 3 2 .... 0 -1 -1 b789fdd96dc2 (re)
37 $ hg --debug debugindex -f 1 a
38 $ hg --debug debugindex -f 1 a
38 rev flag offset length size .... link p1 p2 nodeid (re)
39 rev flag offset length size .... link p1 p2 nodeid (re)
39 0 0000 0 3 2 .... 0 -1 -1 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 (re)
40 0 0000 0 3 2 .... 0 -1 -1 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 (re)
40
41
41
42
42 Test max chain len
43 Test max chain len
43 $ cat >> $HGRCPATH << EOF
44 $ cat >> $HGRCPATH << EOF
44 > [format]
45 > [format]
45 > maxchainlen=4
46 > maxchainlen=4
46 > EOF
47 > EOF
47
48
48 $ printf "This test checks if maxchainlen config value is respected also it can serve as basic test for debugrevlog -d <file>.\n" >> a
49 $ printf "This test checks if maxchainlen config value is respected also it can serve as basic test for debugrevlog -d <file>.\n" >> a
49 $ hg ci -m a
50 $ hg ci -m a
50 $ printf "b\n" >> a
51 $ printf "b\n" >> a
51 $ hg ci -m a
52 $ hg ci -m a
52 $ printf "c\n" >> a
53 $ printf "c\n" >> a
53 $ hg ci -m a
54 $ hg ci -m a
54 $ printf "d\n" >> a
55 $ printf "d\n" >> a
55 $ hg ci -m a
56 $ hg ci -m a
56 $ printf "e\n" >> a
57 $ printf "e\n" >> a
57 $ hg ci -m a
58 $ hg ci -m a
58 $ printf "f\n" >> a
59 $ printf "f\n" >> a
59 $ hg ci -m a
60 $ hg ci -m a
60 $ printf 'g\n' >> a
61 $ printf 'g\n' >> a
61 $ hg ci -m a
62 $ hg ci -m a
62 $ printf 'h\n' >> a
63 $ printf 'h\n' >> a
63 $ hg ci -m a
64 $ hg ci -m a
64 $ hg debugrevlog -d a
65 $ hg debugrevlog -d a
65 # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen
66 # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen
66 0 -1 -1 0 ??? 0 0 0 0 ??? ???? ? 1 0 (glob)
67 0 -1 -1 0 ??? 0 0 0 0 ??? ???? ? 1 0 (glob)
67 1 0 -1 ??? ??? 0 0 0 0 ??? ???? ? 1 1 (glob)
68 1 0 -1 ??? ??? 0 0 0 0 ??? ???? ? 1 1 (glob)
68 2 1 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 2 (glob)
69 2 1 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 2 (glob)
69 3 2 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 3 (glob)
70 3 2 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 3 (glob)
70 4 3 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 4 (glob)
71 4 3 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 4 (glob)
71 5 4 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 0 (glob)
72 5 4 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 0 (glob)
72 6 5 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 1 (glob)
73 6 5 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 1 (glob)
73 7 6 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 2 (glob)
74 7 6 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 2 (glob)
74 8 7 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 3 (glob)
75 8 7 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 3 (glob)
75 $ cd ..
76 $ cd ..
76
77
77 Test internal debugstacktrace command
78 Test internal debugstacktrace command
78
79
79 $ cat > debugstacktrace.py << EOF
80 $ cat > debugstacktrace.py << EOF
80 > from mercurial.util import debugstacktrace, dst, sys
81 > from mercurial.util import debugstacktrace, dst, sys
81 > def f():
82 > def f():
82 > dst('hello world')
83 > dst('hello world')
83 > def g():
84 > def g():
84 > f()
85 > f()
85 > debugstacktrace(skip=-5, f=sys.stdout)
86 > debugstacktrace(skip=-5, f=sys.stdout)
86 > g()
87 > g()
87 > EOF
88 > EOF
88 $ python debugstacktrace.py
89 $ python debugstacktrace.py
89 hello world at:
90 hello world at:
90 debugstacktrace.py:7 in * (glob)
91 debugstacktrace.py:7 in * (glob)
91 debugstacktrace.py:5 in g
92 debugstacktrace.py:5 in g
92 debugstacktrace.py:3 in f
93 debugstacktrace.py:3 in f
93 stacktrace at:
94 stacktrace at:
94 debugstacktrace.py:7 *in * (glob)
95 debugstacktrace.py:7 *in * (glob)
95 debugstacktrace.py:6 *in g (glob)
96 debugstacktrace.py:6 *in g (glob)
96 */util.py:* in debugstacktrace (glob)
97 */util.py:* in debugstacktrace (glob)
General Comments 0
You need to be logged in to leave comments. Login now