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