author | Matt Harbison <matt_harbison@yahoo.com> |
Sat, 16 Dec 2017 11:32:10 -0500 | |
changeset 35450 | 991e4404e910 |
parent 35402 | 12055fb3ba30 |
child 35678 | 43154a76f392 |
permissions | -rw-r--r-- |
26918
0438df737fb7
test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24503
diff
changeset
|
1 |
$ cat << EOF >> $HGRCPATH |
35402
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
2 |
> [ui] |
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
3 |
> interactive=yes |
26918
0438df737fb7
test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24503
diff
changeset
|
4 |
> [format] |
0438df737fb7
test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24503
diff
changeset
|
5 |
> usegeneraldelta=yes |
0438df737fb7
test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24503
diff
changeset
|
6 |
> EOF |
0438df737fb7
test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24503
diff
changeset
|
7 |
|
17188
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
8 |
$ hg init debugrevlog |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
9 |
$ cd debugrevlog |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
10 |
$ echo a > a |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
11 |
$ hg ci -Am adda |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
12 |
adding a |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
13 |
$ hg debugrevlog -m |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
14 |
format : 1 |
26918
0438df737fb7
test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24503
diff
changeset
|
15 |
flags : inline, generaldelta |
17188
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
16 |
|
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
17 |
revisions : 1 |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
18 |
merges : 0 ( 0.00%) |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
19 |
normal : 1 (100.00%) |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
20 |
revisions : 1 |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
21 |
full : 1 (100.00%) |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
22 |
deltas : 0 ( 0.00%) |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
23 |
revision size : 44 |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
24 |
full : 44 (100.00%) |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
25 |
deltas : 0 ( 0.00%) |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
26 |
|
30461
932b18c95e11
commands: print chunk type in debugrevlog
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27263
diff
changeset
|
27 |
chunks : 1 |
932b18c95e11
commands: print chunk type in debugrevlog
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27263
diff
changeset
|
28 |
0x75 (u) : 1 (100.00%) |
932b18c95e11
commands: print chunk type in debugrevlog
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27263
diff
changeset
|
29 |
chunks size : 44 |
932b18c95e11
commands: print chunk type in debugrevlog
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27263
diff
changeset
|
30 |
0x75 (u) : 44 (100.00%) |
932b18c95e11
commands: print chunk type in debugrevlog
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27263
diff
changeset
|
31 |
|
33074
e21b750c9b9e
debugrevlog: align chain length, reach, and compression ratio
Yuya Nishihara <yuya@tcha.org>
parents:
33069
diff
changeset
|
32 |
avg chain length : 0 |
e21b750c9b9e
debugrevlog: align chain length, reach, and compression ratio
Yuya Nishihara <yuya@tcha.org>
parents:
33069
diff
changeset
|
33 |
max chain length : 0 |
e21b750c9b9e
debugrevlog: align chain length, reach, and compression ratio
Yuya Nishihara <yuya@tcha.org>
parents:
33069
diff
changeset
|
34 |
max chain reach : 44 |
e21b750c9b9e
debugrevlog: align chain length, reach, and compression ratio
Yuya Nishihara <yuya@tcha.org>
parents:
33069
diff
changeset
|
35 |
compression ratio : 0 |
17188
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
36 |
|
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
37 |
uncompressed data size (min/max/avg) : 43 / 43 / 43 |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
38 |
full revision size (min/max/avg) : 44 / 44 / 44 |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
39 |
delta size (min/max/avg) : 0 / 0 / 0 |
20244
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
40 |
|
23547
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
41 |
Test debugindex, with and without the --debug flag |
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
42 |
$ hg debugindex a |
26918
0438df737fb7
test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24503
diff
changeset
|
43 |
rev offset length ..... linkrev nodeid p1 p2 (re) |
23547
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
44 |
0 0 3 .... 0 b789fdd96dc2 000000000000 000000000000 (re) |
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
45 |
$ hg --debug debugindex a |
26918
0438df737fb7
test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24503
diff
changeset
|
46 |
rev offset length ..... linkrev nodeid p1 p2 (re) |
23547
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
47 |
0 0 3 .... 0 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 (re) |
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
48 |
$ hg debugindex -f 1 a |
26918
0438df737fb7
test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24503
diff
changeset
|
49 |
rev flag offset length size ..... link p1 p2 nodeid (re) |
23547
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
50 |
0 0000 0 3 2 .... 0 -1 -1 b789fdd96dc2 (re) |
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
51 |
$ hg --debug debugindex -f 1 a |
26918
0438df737fb7
test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24503
diff
changeset
|
52 |
rev flag offset length size ..... link p1 p2 nodeid (re) |
23547
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
53 |
0 0000 0 3 2 .... 0 -1 -1 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 (re) |
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
54 |
|
27263
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
55 |
debugdelta chain basic output |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
56 |
|
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
57 |
$ hg debugdeltachain -m |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
58 |
rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
59 |
0 1 1 -1 base 44 43 44 1.02326 44 0 0.00000 |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
60 |
|
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
61 |
$ hg debugdeltachain -m -T '{rev} {chainid} {chainlen}\n' |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
62 |
0 1 1 |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
63 |
|
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
64 |
$ hg debugdeltachain -m -Tjson |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
65 |
[ |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
66 |
{ |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
67 |
"chainid": 1, |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
68 |
"chainlen": 1, |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
69 |
"chainratio": 1.02325581395, |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
70 |
"chainsize": 44, |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
71 |
"compsize": 44, |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
72 |
"deltatype": "base", |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
73 |
"extradist": 0, |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
74 |
"extraratio": 0.0, |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
75 |
"lindist": 44, |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
76 |
"prevrev": -1, |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
77 |
"rev": 0, |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
78 |
"uncompsize": 43 |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
79 |
} |
4efb36ecaaec
commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26918
diff
changeset
|
80 |
] |
23547
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
81 |
|
35082
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
82 |
debugdelta chain with sparse read enabled |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
83 |
|
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
84 |
$ cat >> $HGRCPATH <<EOF |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
85 |
> [experimental] |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
86 |
> sparse-read = True |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
87 |
> EOF |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
88 |
$ hg debugdeltachain -m |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
89 |
rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
90 |
0 1 1 -1 base 44 43 44 1.02326 44 0 0.00000 44 44 1.00000 |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
91 |
|
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
92 |
$ hg debugdeltachain -m -T '{rev} {chainid} {chainlen} {readsize} {largestblock} {readdensity}\n' |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
93 |
0 1 1 44 44 1.0 |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
94 |
|
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
95 |
$ hg debugdeltachain -m -Tjson |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
96 |
[ |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
97 |
{ |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
98 |
"chainid": 1, |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
99 |
"chainlen": 1, |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
100 |
"chainratio": 1.02325581395, |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
101 |
"chainsize": 44, |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
102 |
"compsize": 44, |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
103 |
"deltatype": "base", |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
104 |
"extradist": 0, |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
105 |
"extraratio": 0.0, |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
106 |
"largestblock": 44, |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
107 |
"lindist": 44, |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
108 |
"prevrev": -1, |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
109 |
"readdensity": 1.0, |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
110 |
"readsize": 44, |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
111 |
"rev": 0, |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
112 |
"uncompsize": 43 |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
113 |
} |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
114 |
] |
5cbbef8d2a57
debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents:
35016
diff
changeset
|
115 |
|
23255
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
116 |
Test max chain len |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
117 |
$ cat >> $HGRCPATH << EOF |
23256
1c11393d5dfb
localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents:
23255
diff
changeset
|
118 |
> [format] |
23255
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
119 |
> maxchainlen=4 |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
120 |
> EOF |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
121 |
|
23256
1c11393d5dfb
localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents:
23255
diff
changeset
|
122 |
$ printf "This test checks if maxchainlen config value is respected also it can serve as basic test for debugrevlog -d <file>.\n" >> a |
23255
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
123 |
$ hg ci -m a |
23256
1c11393d5dfb
localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents:
23255
diff
changeset
|
124 |
$ printf "b\n" >> a |
23255
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
125 |
$ hg ci -m a |
23256
1c11393d5dfb
localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents:
23255
diff
changeset
|
126 |
$ printf "c\n" >> a |
23255
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
127 |
$ hg ci -m a |
23256
1c11393d5dfb
localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents:
23255
diff
changeset
|
128 |
$ printf "d\n" >> a |
23255
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
129 |
$ hg ci -m a |
23256
1c11393d5dfb
localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents:
23255
diff
changeset
|
130 |
$ printf "e\n" >> a |
23255
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
131 |
$ hg ci -m a |
23256
1c11393d5dfb
localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents:
23255
diff
changeset
|
132 |
$ printf "f\n" >> a |
23255
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
133 |
$ hg ci -m a |
23256
1c11393d5dfb
localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents:
23255
diff
changeset
|
134 |
$ printf 'g\n' >> a |
23255
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
135 |
$ hg ci -m a |
23256
1c11393d5dfb
localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents:
23255
diff
changeset
|
136 |
$ printf 'h\n' >> a |
23255
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
137 |
$ hg ci -m a |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
138 |
$ hg debugrevlog -d a |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
139 |
# rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
140 |
0 -1 -1 0 ??? 0 0 0 0 ??? ???? ? 1 0 (glob) |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
141 |
1 0 -1 ??? ??? 0 0 0 0 ??? ???? ? 1 1 (glob) |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
142 |
2 1 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 2 (glob) |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
143 |
3 2 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 3 (glob) |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
144 |
4 3 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 4 (glob) |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
145 |
5 4 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 0 (glob) |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
146 |
6 5 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 1 (glob) |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
147 |
7 6 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 2 (glob) |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
148 |
8 7 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 3 (glob) |
32305
ccef71de7d41
caches: introduce a 'debugupdatecaches' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31324
diff
changeset
|
149 |
|
35401
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
150 |
Test debuglocks command: |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
151 |
|
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
152 |
$ hg debuglocks |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
153 |
lock: free |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
154 |
wlock: free |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
155 |
|
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
156 |
* Test setting the lock |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
157 |
|
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
158 |
waitlock <file> will wait for file to be created. If it isn't in a reasonable |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
159 |
amount of time, displays error message and returns 1 |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
160 |
$ waitlock() { |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
161 |
> start=`date +%s` |
35402
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
162 |
> timeout=5 |
35401
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
163 |
> while [ \( ! -f $1 \) -a \( ! -L $1 \) ]; do |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
164 |
> now=`date +%s` |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
165 |
> if [ "`expr $now - $start`" -gt $timeout ]; then |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
166 |
> echo "timeout: $1 was not created in $timeout seconds" |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
167 |
> return 1 |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
168 |
> fi |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
169 |
> sleep 0.1 |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
170 |
> done |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
171 |
> } |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
172 |
$ dolock() { |
35402
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
173 |
> { |
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
174 |
> waitlock .hg/unlock |
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
175 |
> rm -f .hg/unlock |
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
176 |
> echo y |
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
177 |
> } | hg debuglocks "$@" > /dev/null |
35401
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
178 |
> } |
35402
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
179 |
$ dolock -s & |
35401
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
180 |
$ waitlock .hg/store/lock |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
181 |
|
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
182 |
$ hg debuglocks |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
183 |
lock: user *, process * (*s) (glob) |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
184 |
wlock: free |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
185 |
[1] |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
186 |
$ touch .hg/unlock |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
187 |
$ wait |
35402
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
188 |
$ [ -f .hg/store/lock ] || echo "There is no lock" |
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
189 |
There is no lock |
35401
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
190 |
|
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
191 |
* Test setting the wlock |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
192 |
|
35402
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
193 |
$ dolock -S & |
35401
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
194 |
$ waitlock .hg/wlock |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
195 |
|
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
196 |
$ hg debuglocks |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
197 |
lock: free |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
198 |
wlock: user *, process * (*s) (glob) |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
199 |
[1] |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
200 |
$ touch .hg/unlock |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
201 |
$ wait |
35402
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
202 |
$ [ -f .hg/wlock ] || echo "There is no wlock" |
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
203 |
There is no wlock |
35401
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
204 |
|
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
205 |
* Test setting both locks |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
206 |
|
35402
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
207 |
$ dolock -Ss & |
35401
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
208 |
$ waitlock .hg/wlock && waitlock .hg/store/lock |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
209 |
|
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
210 |
$ hg debuglocks |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
211 |
lock: user *, process * (*s) (glob) |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
212 |
wlock: user *, process * (*s) (glob) |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
213 |
[2] |
35402
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
214 |
|
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
215 |
* Test failing to set a lock |
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
216 |
|
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
217 |
$ hg debuglocks -s |
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
218 |
abort: lock is already held |
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
219 |
[255] |
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
220 |
|
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
221 |
$ hg debuglocks -S |
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
222 |
abort: wlock is already held |
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
223 |
[255] |
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
224 |
|
35401
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
225 |
$ touch .hg/unlock |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
226 |
$ wait |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
227 |
|
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
228 |
$ hg debuglocks |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
229 |
lock: free |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
230 |
wlock: free |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
231 |
|
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
232 |
* Test forcing the lock |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
233 |
|
35402
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
234 |
$ dolock -s & |
35401
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
235 |
$ waitlock .hg/store/lock |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
236 |
|
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
237 |
$ hg debuglocks |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
238 |
lock: user *, process * (*s) (glob) |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
239 |
wlock: free |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
240 |
[1] |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
241 |
|
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
242 |
$ hg debuglocks -L |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
243 |
|
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
244 |
$ hg debuglocks |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
245 |
lock: free |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
246 |
wlock: free |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
247 |
|
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
248 |
$ touch .hg/unlock |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
249 |
$ wait |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
250 |
|
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
251 |
* Test forcing the wlock |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
252 |
|
35402
12055fb3ba30
debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents:
35401
diff
changeset
|
253 |
$ dolock -S & |
35401
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
254 |
$ waitlock .hg/wlock |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
255 |
|
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
256 |
$ hg debuglocks |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
257 |
lock: free |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
258 |
wlock: user *, process * (*s) (glob) |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
259 |
[1] |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
260 |
|
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
261 |
$ hg debuglocks -W |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
262 |
|
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
263 |
$ hg debuglocks |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
264 |
lock: free |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
265 |
wlock: free |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
266 |
|
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
267 |
$ touch .hg/unlock |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
268 |
$ wait |
a43b2dd95e4f
debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents:
35268
diff
changeset
|
269 |
|
32679
7b17f9de6d3e
revlog: map rev(wdirid) to WdirUnsupported exception
Yuya Nishihara <yuya@tcha.org>
parents:
32307
diff
changeset
|
270 |
Test WdirUnsupported exception |
7b17f9de6d3e
revlog: map rev(wdirid) to WdirUnsupported exception
Yuya Nishihara <yuya@tcha.org>
parents:
32307
diff
changeset
|
271 |
|
7b17f9de6d3e
revlog: map rev(wdirid) to WdirUnsupported exception
Yuya Nishihara <yuya@tcha.org>
parents:
32307
diff
changeset
|
272 |
$ hg debugdata -c ffffffffffffffffffffffffffffffffffffffff |
7b17f9de6d3e
revlog: map rev(wdirid) to WdirUnsupported exception
Yuya Nishihara <yuya@tcha.org>
parents:
32307
diff
changeset
|
273 |
abort: working directory revision cannot be specified |
7b17f9de6d3e
revlog: map rev(wdirid) to WdirUnsupported exception
Yuya Nishihara <yuya@tcha.org>
parents:
32307
diff
changeset
|
274 |
[255] |
7b17f9de6d3e
revlog: map rev(wdirid) to WdirUnsupported exception
Yuya Nishihara <yuya@tcha.org>
parents:
32307
diff
changeset
|
275 |
|
32305
ccef71de7d41
caches: introduce a 'debugupdatecaches' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31324
diff
changeset
|
276 |
Test cache warming command |
ccef71de7d41
caches: introduce a 'debugupdatecaches' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31324
diff
changeset
|
277 |
|
ccef71de7d41
caches: introduce a 'debugupdatecaches' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31324
diff
changeset
|
278 |
$ rm -rf .hg/cache/ |
ccef71de7d41
caches: introduce a 'debugupdatecaches' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31324
diff
changeset
|
279 |
$ hg debugupdatecaches --debug |
32307
c2380b448265
caches: move the 'updating the branch cache' message in 'updatecaches'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32305
diff
changeset
|
280 |
updating the branch cache |
32305
ccef71de7d41
caches: introduce a 'debugupdatecaches' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31324
diff
changeset
|
281 |
$ ls -r .hg/cache/* |
ccef71de7d41
caches: introduce a 'debugupdatecaches' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31324
diff
changeset
|
282 |
.hg/cache/rbc-revs-v1 |
ccef71de7d41
caches: introduce a 'debugupdatecaches' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31324
diff
changeset
|
283 |
.hg/cache/rbc-names-v1 |
ccef71de7d41
caches: introduce a 'debugupdatecaches' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31324
diff
changeset
|
284 |
.hg/cache/branch2-served |
ccef71de7d41
caches: introduce a 'debugupdatecaches' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31324
diff
changeset
|
285 |
|
23255
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
286 |
$ cd .. |
20244
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
287 |
|
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
288 |
Test internal debugstacktrace command |
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
289 |
|
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
290 |
$ cat > debugstacktrace.py << EOF |
33971
90981271a904
tests: update test-debugcommands to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33074
diff
changeset
|
291 |
> from __future__ import absolute_import |
90981271a904
tests: update test-debugcommands to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33074
diff
changeset
|
292 |
> import sys |
90981271a904
tests: update test-debugcommands to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33074
diff
changeset
|
293 |
> from mercurial import util |
20244
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
294 |
> def f(): |
33971
90981271a904
tests: update test-debugcommands to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33074
diff
changeset
|
295 |
> util.debugstacktrace(f=sys.stdout) |
31322
80752c655320
tests: rework util.debugstacktrace tests
Mads Kiilerich <madski@unity3d.com>
parents:
30461
diff
changeset
|
296 |
> g() |
20244
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
297 |
> def g(): |
33971
90981271a904
tests: update test-debugcommands to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33074
diff
changeset
|
298 |
> util.dst('hello from g\\n', skip=1) |
31322
80752c655320
tests: rework util.debugstacktrace tests
Mads Kiilerich <madski@unity3d.com>
parents:
30461
diff
changeset
|
299 |
> h() |
80752c655320
tests: rework util.debugstacktrace tests
Mads Kiilerich <madski@unity3d.com>
parents:
30461
diff
changeset
|
300 |
> def h(): |
33971
90981271a904
tests: update test-debugcommands to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33074
diff
changeset
|
301 |
> util.dst('hi ...\\nfrom h hidden in g', 1, depth=2) |
31322
80752c655320
tests: rework util.debugstacktrace tests
Mads Kiilerich <madski@unity3d.com>
parents:
30461
diff
changeset
|
302 |
> f() |
20244
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
303 |
> EOF |
32958
75be14993fda
cleanup: use $PYTHON to run python in many more tests
Augie Fackler <augie@google.com>
parents:
32679
diff
changeset
|
304 |
$ $PYTHON debugstacktrace.py |
20244
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
305 |
stacktrace at: |
33971
90981271a904
tests: update test-debugcommands to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33074
diff
changeset
|
306 |
debugstacktrace.py:12 in * (glob) |
90981271a904
tests: update test-debugcommands to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33074
diff
changeset
|
307 |
debugstacktrace.py:5 in f |
31323
7c877cbf30d6
util: strip trailing newline from debugstacktrace message
Mads Kiilerich <madski@unity3d.com>
parents:
31322
diff
changeset
|
308 |
hello from g at: |
33971
90981271a904
tests: update test-debugcommands to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33074
diff
changeset
|
309 |
debugstacktrace.py:12 in * (glob) |
90981271a904
tests: update test-debugcommands to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33074
diff
changeset
|
310 |
debugstacktrace.py:6 in f |
31322
80752c655320
tests: rework util.debugstacktrace tests
Mads Kiilerich <madski@unity3d.com>
parents:
30461
diff
changeset
|
311 |
hi ... |
80752c655320
tests: rework util.debugstacktrace tests
Mads Kiilerich <madski@unity3d.com>
parents:
30461
diff
changeset
|
312 |
from h hidden in g at: |
33971
90981271a904
tests: update test-debugcommands to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33074
diff
changeset
|
313 |
debugstacktrace.py:6 in f |
90981271a904
tests: update test-debugcommands to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33074
diff
changeset
|
314 |
debugstacktrace.py:9 in g |
35015
7ee2d859f720
debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents:
33971
diff
changeset
|
315 |
|
7ee2d859f720
debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents:
33971
diff
changeset
|
316 |
Test debugcapabilities command: |
7ee2d859f720
debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents:
33971
diff
changeset
|
317 |
|
7ee2d859f720
debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents:
33971
diff
changeset
|
318 |
$ hg debugcapabilities ./debugrevlog/ |
7ee2d859f720
debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents:
33971
diff
changeset
|
319 |
Main capabilities: |
7ee2d859f720
debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents:
33971
diff
changeset
|
320 |
branchmap |
35097
62e10bf001a9
test-pattern: actually update tests using the patterns
Boris Feld <boris.feld@octobus.net>
parents:
35082
diff
changeset
|
321 |
$USUAL_BUNDLE2_CAPS$ |
35015
7ee2d859f720
debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents:
33971
diff
changeset
|
322 |
getbundle |
7ee2d859f720
debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents:
33971
diff
changeset
|
323 |
known |
7ee2d859f720
debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents:
33971
diff
changeset
|
324 |
lookup |
7ee2d859f720
debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents:
33971
diff
changeset
|
325 |
pushkey |
7ee2d859f720
debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents:
33971
diff
changeset
|
326 |
unbundle |
35016
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
327 |
Bundle2 capabilities: |
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
328 |
HG20 |
35268
ad5f2b923b0d
push: include a 'check:bookmarks' part when possible
Boris Feld <boris.feld@octobus.net>
parents:
35097
diff
changeset
|
329 |
bookmarks |
35016
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
330 |
changegroup |
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
331 |
01 |
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
332 |
02 |
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
333 |
digests |
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
334 |
md5 |
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
335 |
sha1 |
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
336 |
sha512 |
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
337 |
error |
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
338 |
abort |
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
339 |
unsupportedcontent |
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
340 |
pushraced |
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
341 |
pushkey |
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
342 |
hgtagsfnodes |
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
343 |
listkeys |
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
344 |
phases |
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
345 |
heads |
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
346 |
pushkey |
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
347 |
remote-changegroup |
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
348 |
http |
762ea8a1f5e7
debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents:
35015
diff
changeset
|
349 |
https |