Mercurial > hg
annotate tests/test-blackbox.t @ 42044:bb271ec2fbfb
compression: introduce a `storage.revlog.zstd.level` configuration
This option control the zstd compression level used when compressing revlog
chunk. The usage of zstd for revlog compression has not graduated from
experimental yet, but we intend to fix that soon.
The option name for the compression level is more straight forward to pick, so
this changesets comes first. Having a dedicated option for each compression
engine is useful because they don't support the same range of values.
I ran the same measurement as for the zlib compression level (in the parent
changesets). The variation in repository size is stay mostly in the same (small)
range. The "read/write" performance see smallish variation, but are overall much
better than zlib. Write performance show the same tend of having better write
performance for when reaching high-end compression.
Again, we don't intend to change the default zstd compression level (currently:
3) in this series. However this is worth investigating in the future.
The Performance comparison of zlib vs zstd is quite impressive. The repository
size stay in the same range, but the performance are much better in all
situations.
Comparison summary
==================
We are looking at:
- performance range for zlib
- performance range for zstd
- comparison of default zstd (level-3) to default zlib (level 6)
- comparison of the slowest zstd time to the fastest zlib time
Read performance:
-----------------
| zlib | zstd | cmp | f2s
mercurial | 0.170159 - 0.189219 | 0.144127 - 0.149624 | 80% | 88%
pypy | 2.679217 - 2.768691 | 1.532317 - 1.705044 | 60% | 63%
netbeans | 122.477027 - 141.620281 | 72.996346 - 89.731560 | 58% | 73%
mozilla | 147.867662 - 170.572118 | 91.700995 - 105.853099 | 56% | 71%
Write performance:
------------------
| zlib | zstd | cmp | f2s
mercurial | 53.250304 - 56.2936129 | 40.877025 - 45.677286 | 75% | 86%
pypy | 460.721984 - 476.589918 | 270.545409 - 301.002219 | 63% | 65%
netbeans | 520.560316 - 715.930400 | 370.356311 - 428.329652 | 55% | 82%
mozilla | 739.803002 - 987.056093 | 505.152906 - 591.930683 | 57% | 80%
Raw data
--------
repo alg lvl .hg/store size 00manifest.d read write
mercurial zlib 1 49,402,813 5,963,475 0.170159 53.250304
mercurial zlib 6 47,197,397 5,875,730 0.182820 56.264320
mercurial zlib 9 47,121,596 5,849,781 0.189219 56.293612
mercurial zstd 1 49,737,084 5,966,355 0.144127 40.877025
mercurial zstd 3 48,961,867 5,895,208 0.146376 42.268142
mercurial zstd 5 48,200,592 5,938,676 0.149624 43.162875
mercurial zstd 10 47,833,520 5,913,353 0.145185 44.012489
mercurial zstd 15 47,314,604 5,728,679 0.147686 45.677286
mercurial zstd 20 47,330,502 5,830,539 0.145789 45.025407
mercurial zstd 22 47,330,076 5,830,539 0.143996 44.690460
pypy zlib 1 370,830,572 28,462,425 2.679217 460.721984
pypy zlib 6 340,112,317 27,648,747 2.768691 467.537158
pypy zlib 9 338,360,736 27,639,003 2.763495 476.589918
pypy zstd 1 362,377,479 27,916,214 1.532317 270.545409
pypy zstd 3 354,137,693 27,905,988 1.686718 294.951509
pypy zstd 5 342,640,043 27,655,774 1.705044 301.002219
pypy zstd 10 334,224,327 27,164,493 1.567287 285.186239
pypy zstd 15 329,000,363 26,645,965 1.637729 299.561332
pypy zstd 20 324,534,039 26,199,547 1.526813 302.149827
pypy zstd 22 324,530,595 26,198,932 1.525718 307.821218
netbeans zlib 1 1,281,847,810 165,495,457 122.477027 520.560316
netbeans zlib 6 1,205,284,353 159,161,207 139.876147 715.930400
netbeans zlib 9 1,197,135,671 155,034,586 141.620281 678.297064
netbeans zstd 1 1,259,581,737 160,840,613 72.996346 370.356311
netbeans zstd 3 1,232,978,122 157,691,551 81.622317 396.733087
netbeans zstd 5 1,208,034,075 160,246,880 83.080549 364.342626
netbeans zstd 10 1,188,624,176 156,083,417 79.323935 403.594602
netbeans zstd 15 1,176,973,589 153,859,477 89.731560 428.329652
netbeans zstd 20 1,162,958,258 151,147,535 82.842667 392.335349
netbeans zstd 22 1,162,707,029 151,150,220 82.565695 402.840655
mozilla zlib 1 2,775,497,186 298,527,987 147.867662 751.263721
mozilla zlib 6 2,596,856,420 286,597,671 170.572118 987.056093
mozilla zlib 9 2,587,542,494 287,018,264 163.622338 739.803002
mozilla zstd 1 2,723,159,348 286,617,532 91.700995 570.042751
mozilla zstd 3 2,665,055,001 286,152,013 95.240155 561.412805
mozilla zstd 5 2,607,819,817 288,060,030 101.978048 505.152906
mozilla zstd 10 2,558,761,085 283,967,648 104.113481 497.771202
mozilla zstd 15 2,526,216,060 275,581,300 105.853099 591.930683
mozilla zstd 20 2,485,114,806 266,478,859 95.268795 576.515389
mozilla zstd 22 2,484,869,080 266,456,505 94.429282 572.785537
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 27 Mar 2019 18:35:59 +0100 |
parents | 19d8d6856338 |
children | bb135a784b70 |
rev | line source |
---|---|
18674
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
1 setup |
38016
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
2 |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
3 $ cat > myextension.py <<EOF |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
4 > from mercurial import error, registrar |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
5 > cmdtable = {} |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
6 > command = registrar.command(cmdtable) |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
7 > @command(b'crash', [], b'hg crash') |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
8 > def crash(ui, *args, **kwargs): |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
9 > raise Exception("oops") |
38023
c3fd9a0f8277
dispatch: mask negative exit code recorded in blackbox log
Yuya Nishihara <yuya@tcha.org>
parents:
38022
diff
changeset
|
10 > @command(b'abort', [], b'hg abort') |
c3fd9a0f8277
dispatch: mask negative exit code recorded in blackbox log
Yuya Nishihara <yuya@tcha.org>
parents:
38022
diff
changeset
|
11 > def abort(ui, *args, **kwargs): |
c3fd9a0f8277
dispatch: mask negative exit code recorded in blackbox log
Yuya Nishihara <yuya@tcha.org>
parents:
38022
diff
changeset
|
12 > raise error.Abort(b"oops") |
38016
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
13 > EOF |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
14 $ abspath=`pwd`/myextension.py |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
15 |
18674
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
16 $ cat >> $HGRCPATH <<EOF |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
17 > [extensions] |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
18 > blackbox= |
24705
0ead0a07ed9c
tests: move mock blackbox extension into own file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
21031
diff
changeset
|
19 > mock=$TESTDIR/mockblackbox.py |
18766
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
20 > mq= |
38016
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
21 > myextension=$TESTTMP/myextension.py |
29846
318e2b600b80
blackbox: also log alias expansions
Augie Fackler <augie@google.com>
parents:
28888
diff
changeset
|
22 > [alias] |
318e2b600b80
blackbox: also log alias expansions
Augie Fackler <augie@google.com>
parents:
28888
diff
changeset
|
23 > confuse = log --limit 3 |
34298
25e1a8876cc0
tests: add a test for blackbox with nested alias configurations
Augie Fackler <augie@google.com>
parents:
34297
diff
changeset
|
24 > so-confusing = confuse --style compact |
40992
1de3364320af
tests: filter out uninteresting log events
Yuya Nishihara <yuya@tcha.org>
parents:
40808
diff
changeset
|
25 > [blackbox] |
1de3364320af
tests: filter out uninteresting log events
Yuya Nishihara <yuya@tcha.org>
parents:
40808
diff
changeset
|
26 > track = backupbundle, branchcache, command, commandalias, commandexception, |
1de3364320af
tests: filter out uninteresting log events
Yuya Nishihara <yuya@tcha.org>
parents:
40808
diff
changeset
|
27 > commandfinish, debug, exthook, incoming, pythonhook, tagscache |
18674
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
28 > EOF |
38016
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
29 |
18674
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
30 $ hg init blackboxtest |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
31 $ cd blackboxtest |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
32 |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
33 command, exit codes, and duration |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
34 |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
35 $ echo a > a |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
36 $ hg add a |
28246 | 37 $ hg blackbox --config blackbox.dirty=True |
34276
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
38 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> init blackboxtest exited 0 after * seconds (glob) |
28245
caa2a0c6fbb7
blackbox: log working directory version
timeless <timeless@mozdev.org>
parents:
28242
diff
changeset
|
39 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> add a |
28247
d2c0527af364
blackbox: store the blackbox ui object instead of the log file
timeless <timeless@mozdev.org>
parents:
28246
diff
changeset
|
40 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> add a exited 0 after * seconds (glob) |
35034
02845f7441af
dispatch: verify result of early command parsing
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
41 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000+ (5000)> blackbox --config *blackbox.dirty=True* (glob) |
18674
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
42 |
38016
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
43 failure exit code |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
44 $ rm ./.hg/blackbox.log |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
45 $ hg add non-existent |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
46 non-existent: $ENOENT$ |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
47 [1] |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
48 $ hg blackbox |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
49 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> add non-existent |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
50 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> add non-existent exited 1 after * seconds (glob) |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
51 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
52 |
38023
c3fd9a0f8277
dispatch: mask negative exit code recorded in blackbox log
Yuya Nishihara <yuya@tcha.org>
parents:
38022
diff
changeset
|
53 abort exit code |
c3fd9a0f8277
dispatch: mask negative exit code recorded in blackbox log
Yuya Nishihara <yuya@tcha.org>
parents:
38022
diff
changeset
|
54 $ rm ./.hg/blackbox.log |
c3fd9a0f8277
dispatch: mask negative exit code recorded in blackbox log
Yuya Nishihara <yuya@tcha.org>
parents:
38022
diff
changeset
|
55 $ hg abort 2> /dev/null |
c3fd9a0f8277
dispatch: mask negative exit code recorded in blackbox log
Yuya Nishihara <yuya@tcha.org>
parents:
38022
diff
changeset
|
56 [255] |
c3fd9a0f8277
dispatch: mask negative exit code recorded in blackbox log
Yuya Nishihara <yuya@tcha.org>
parents:
38022
diff
changeset
|
57 $ hg blackbox -l 2 |
c3fd9a0f8277
dispatch: mask negative exit code recorded in blackbox log
Yuya Nishihara <yuya@tcha.org>
parents:
38022
diff
changeset
|
58 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> abort exited 255 after * seconds (glob) |
c3fd9a0f8277
dispatch: mask negative exit code recorded in blackbox log
Yuya Nishihara <yuya@tcha.org>
parents:
38022
diff
changeset
|
59 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox -l 2 |
c3fd9a0f8277
dispatch: mask negative exit code recorded in blackbox log
Yuya Nishihara <yuya@tcha.org>
parents:
38022
diff
changeset
|
60 |
38016
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
61 unhandled exception |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
62 $ rm ./.hg/blackbox.log |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
63 $ hg crash 2> /dev/null |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
64 [1] |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
65 $ hg blackbox -l 2 |
38022
48853a927757
dispatch: fix exit code of unhandled exception recorded in blackbox log
Yuya Nishihara <yuya@tcha.org>
parents:
38016
diff
changeset
|
66 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> crash exited 1 after * seconds (glob) |
38016
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
67 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox -l 2 |
81ca0fd348e3
tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents:
37995
diff
changeset
|
68 |
29846
318e2b600b80
blackbox: also log alias expansions
Augie Fackler <augie@google.com>
parents:
28888
diff
changeset
|
69 alias expansion is logged |
34297
7f02fb920121
tests: clean up blackbox test around aliases a little bit
Augie Fackler <augie@google.com>
parents:
34276
diff
changeset
|
70 $ rm ./.hg/blackbox.log |
29846
318e2b600b80
blackbox: also log alias expansions
Augie Fackler <augie@google.com>
parents:
28888
diff
changeset
|
71 $ hg confuse |
318e2b600b80
blackbox: also log alias expansions
Augie Fackler <augie@google.com>
parents:
28888
diff
changeset
|
72 $ hg blackbox |
318e2b600b80
blackbox: also log alias expansions
Augie Fackler <augie@google.com>
parents:
28888
diff
changeset
|
73 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> confuse |
318e2b600b80
blackbox: also log alias expansions
Augie Fackler <augie@google.com>
parents:
28888
diff
changeset
|
74 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> alias 'confuse' expands to 'log --limit 3' |
318e2b600b80
blackbox: also log alias expansions
Augie Fackler <augie@google.com>
parents:
28888
diff
changeset
|
75 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> confuse exited 0 after * seconds (glob) |
318e2b600b80
blackbox: also log alias expansions
Augie Fackler <augie@google.com>
parents:
28888
diff
changeset
|
76 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox |
318e2b600b80
blackbox: also log alias expansions
Augie Fackler <augie@google.com>
parents:
28888
diff
changeset
|
77 |
34298
25e1a8876cc0
tests: add a test for blackbox with nested alias configurations
Augie Fackler <augie@google.com>
parents:
34297
diff
changeset
|
78 recursive aliases work correctly |
25e1a8876cc0
tests: add a test for blackbox with nested alias configurations
Augie Fackler <augie@google.com>
parents:
34297
diff
changeset
|
79 $ rm ./.hg/blackbox.log |
25e1a8876cc0
tests: add a test for blackbox with nested alias configurations
Augie Fackler <augie@google.com>
parents:
34297
diff
changeset
|
80 $ hg so-confusing |
25e1a8876cc0
tests: add a test for blackbox with nested alias configurations
Augie Fackler <augie@google.com>
parents:
34297
diff
changeset
|
81 $ hg blackbox |
25e1a8876cc0
tests: add a test for blackbox with nested alias configurations
Augie Fackler <augie@google.com>
parents:
34297
diff
changeset
|
82 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> so-confusing |
25e1a8876cc0
tests: add a test for blackbox with nested alias configurations
Augie Fackler <augie@google.com>
parents:
34297
diff
changeset
|
83 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> alias 'so-confusing' expands to 'confuse --style compact' |
25e1a8876cc0
tests: add a test for blackbox with nested alias configurations
Augie Fackler <augie@google.com>
parents:
34297
diff
changeset
|
84 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> alias 'confuse' expands to 'log --limit 3' |
25e1a8876cc0
tests: add a test for blackbox with nested alias configurations
Augie Fackler <augie@google.com>
parents:
34297
diff
changeset
|
85 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> so-confusing exited 0 after * seconds (glob) |
25e1a8876cc0
tests: add a test for blackbox with nested alias configurations
Augie Fackler <augie@google.com>
parents:
34297
diff
changeset
|
86 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox |
25e1a8876cc0
tests: add a test for blackbox with nested alias configurations
Augie Fackler <augie@google.com>
parents:
34297
diff
changeset
|
87 |
40439
25f1c7bd649d
blackbox: add configitem for format of log timestamps
Matt DeVore <matvore@google.com>
parents:
40369
diff
changeset
|
88 custom date format |
25f1c7bd649d
blackbox: add configitem for format of log timestamps
Matt DeVore <matvore@google.com>
parents:
40369
diff
changeset
|
89 $ rm ./.hg/blackbox.log |
25f1c7bd649d
blackbox: add configitem for format of log timestamps
Matt DeVore <matvore@google.com>
parents:
40369
diff
changeset
|
90 $ hg --config blackbox.date-format='%Y-%m-%d @ %H:%M:%S' \ |
25f1c7bd649d
blackbox: add configitem for format of log timestamps
Matt DeVore <matvore@google.com>
parents:
40369
diff
changeset
|
91 > --config devel.default-date='1334347993 0' --traceback status |
25f1c7bd649d
blackbox: add configitem for format of log timestamps
Matt DeVore <matvore@google.com>
parents:
40369
diff
changeset
|
92 A a |
25f1c7bd649d
blackbox: add configitem for format of log timestamps
Matt DeVore <matvore@google.com>
parents:
40369
diff
changeset
|
93 $ hg blackbox |
40442
d69cf134bd50
tests: glob over a single quote vs double quote difference on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
40439
diff
changeset
|
94 2012-04-13 @ 20:13:13 bob @0000000000000000000000000000000000000000 (5000)> --config *blackbox.date-format=%Y-%m-%d @ %H:%M:%S* --config *devel.default-date=1334347993 0* --traceback status (glob) |
d69cf134bd50
tests: glob over a single quote vs double quote difference on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
40439
diff
changeset
|
95 2012-04-13 @ 20:13:13 bob @0000000000000000000000000000000000000000 (5000)> --config *blackbox.date-format=%Y-%m-%d @ %H:%M:%S* --config *devel.default-date=1334347993 0* --traceback status exited 0 after * seconds (glob) |
40439
25f1c7bd649d
blackbox: add configitem for format of log timestamps
Matt DeVore <matvore@google.com>
parents:
40369
diff
changeset
|
96 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox |
25f1c7bd649d
blackbox: add configitem for format of log timestamps
Matt DeVore <matvore@google.com>
parents:
40369
diff
changeset
|
97 |
18677
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
98 incoming change tracking |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
99 |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
100 create two heads to verify that we only see one change in the log later |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
101 $ hg commit -ma |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
102 $ hg up null |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
103 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
104 $ echo b > b |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
105 $ hg commit -Amb |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
106 adding b |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
107 created new head |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
108 |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
109 clone, commit, pull |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
110 $ hg clone . ../blackboxtest2 |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
111 updating to branch default |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
112 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
113 $ echo c > c |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
114 $ hg commit -Amc |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
115 adding c |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
116 $ cd ../blackboxtest2 |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
117 $ hg pull |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35034
diff
changeset
|
118 pulling from $TESTTMP/blackboxtest |
18677
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
119 searching for changes |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
120 adding changesets |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
121 adding manifests |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
122 adding file changes |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
123 added 1 changesets with 1 changes to 1 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
34299
diff
changeset
|
124 new changesets d02f48003e62 |
18677
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
125 (run 'hg update' to get a working copy) |
28025
ab6468270b83
blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents:
28024
diff
changeset
|
126 $ hg blackbox -l 6 |
28245
caa2a0c6fbb7
blackbox: log working directory version
timeless <timeless@mozdev.org>
parents:
28242
diff
changeset
|
127 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> pull |
caa2a0c6fbb7
blackbox: log working directory version
timeless <timeless@mozdev.org>
parents:
28242
diff
changeset
|
128 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> updated served branch cache in * seconds (glob) |
caa2a0c6fbb7
blackbox: log working directory version
timeless <timeless@mozdev.org>
parents:
28242
diff
changeset
|
129 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> wrote served branch cache with 1 labels and 2 nodes |
caa2a0c6fbb7
blackbox: log working directory version
timeless <timeless@mozdev.org>
parents:
28242
diff
changeset
|
130 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> 1 incoming changes - new heads: d02f48003e62 |
28247
d2c0527af364
blackbox: store the blackbox ui object instead of the log file
timeless <timeless@mozdev.org>
parents:
28246
diff
changeset
|
131 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> pull exited 0 after * seconds (glob) |
28245
caa2a0c6fbb7
blackbox: log working directory version
timeless <timeless@mozdev.org>
parents:
28242
diff
changeset
|
132 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> blackbox -l 6 |
18677
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
133 |
18786
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
134 we must not cause a failure if we cannot write to the log |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
135 |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
136 $ hg rollback |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
137 repository tip rolled back to revision 1 (undo pull) |
19082
63dda3c3bb11
blackbox: don't run permission tests on non-unix systems
Durham Goode <durham@fb.com>
parents:
19066
diff
changeset
|
138 |
28024
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
139 $ mv .hg/blackbox.log .hg/blackbox.log- |
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
140 $ mkdir .hg/blackbox.log |
18786
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
141 $ hg --debug incoming |
28024
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
142 warning: cannot write to blackbox.log: * (glob) |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35034
diff
changeset
|
143 comparing with $TESTTMP/blackboxtest |
18786
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
144 query 1; heads |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
145 searching for changes |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
146 all local heads known remotely |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
147 changeset: 2:d02f48003e62c24e2659d97d30f2a83abe5d5d51 |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
148 tag: tip |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
149 phase: draft |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
150 parent: 1:6563da9dcf87b1949716e38ff3e3dfaa3198eb06 |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
151 parent: -1:0000000000000000000000000000000000000000 |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
152 manifest: 2:ab9d46b053ebf45b7996f2922b9893ff4b63d892 |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
153 user: test |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
154 date: Thu Jan 01 00:00:00 1970 +0000 |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
155 files+: c |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
156 extra: branch=default |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
157 description: |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
158 c |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
159 |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
160 |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
161 $ hg pull |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35034
diff
changeset
|
162 pulling from $TESTTMP/blackboxtest |
18786
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
163 searching for changes |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
164 adding changesets |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
165 adding manifests |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
166 adding file changes |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
167 added 1 changesets with 1 changes to 1 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
34299
diff
changeset
|
168 new changesets d02f48003e62 |
18786
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
169 (run 'hg update' to get a working copy) |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
170 |
28024
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
171 a failure reading from the log is fatal |
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
172 |
18786
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
173 $ hg blackbox -l 3 |
28024
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
174 abort: *$TESTTMP/blackboxtest2/.hg/blackbox.log* (glob) |
18786
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
175 [255] |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
176 |
28024
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
177 $ rmdir .hg/blackbox.log |
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
178 $ mv .hg/blackbox.log- .hg/blackbox.log |
18786
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
179 |
18766
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
180 backup bundles get logged |
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
181 |
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
182 $ touch d |
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
183 $ hg commit -Amd |
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
184 adding d |
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
185 created new head |
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
186 $ hg strip tip |
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
187 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
188 saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/*-backup.hg (glob) |
28025
ab6468270b83
blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents:
28024
diff
changeset
|
189 $ hg blackbox -l 6 |
28245
caa2a0c6fbb7
blackbox: log working directory version
timeless <timeless@mozdev.org>
parents:
28242
diff
changeset
|
190 1970/01/01 00:00:00 bob @73f6ee326b27d820b0472f1a825e3a50f3dc489b (5000)> strip tip |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35034
diff
changeset
|
191 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/73f6ee326b27-7612e004-backup.hg |
28245
caa2a0c6fbb7
blackbox: log working directory version
timeless <timeless@mozdev.org>
parents:
28242
diff
changeset
|
192 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> updated base branch cache in * seconds (glob) |
caa2a0c6fbb7
blackbox: log working directory version
timeless <timeless@mozdev.org>
parents:
28242
diff
changeset
|
193 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> wrote base branch cache with 1 labels and 2 nodes |
28247
d2c0527af364
blackbox: store the blackbox ui object instead of the log file
timeless <timeless@mozdev.org>
parents:
28246
diff
changeset
|
194 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> strip tip exited 0 after * seconds (glob) |
28245
caa2a0c6fbb7
blackbox: log working directory version
timeless <timeless@mozdev.org>
parents:
28242
diff
changeset
|
195 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> blackbox -l 6 |
18766
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
196 |
18674
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
197 extension and python hooks - use the eol extension for a pythonhook |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
198 |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
199 $ echo '[extensions]' >> .hg/hgrc |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
200 $ echo 'eol=' >> .hg/hgrc |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
201 $ echo '[hooks]' >> .hg/hgrc |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
202 $ echo 'update = echo hooked' >> .hg/hgrc |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
203 $ hg update |
33425
886207fb18ab
tests: take extra care for fsmonitor at enabling incompatible extension
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
32940
diff
changeset
|
204 The fsmonitor extension is incompatible with the eol extension and has been disabled. (fsmonitor !) |
26752
949e8c626d19
merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26185
diff
changeset
|
205 hooked |
26028
6fbe35588433
update: wlock the repo for the whole 'hg update' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24763
diff
changeset
|
206 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
32698
1b5c61d38a52
update: show the commit to which we updated in case of multiple heads (BC)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32266
diff
changeset
|
207 updated to "d02f48003e62: c" |
28029
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28028
diff
changeset
|
208 1 other heads for branch "default" |
33425
886207fb18ab
tests: take extra care for fsmonitor at enabling incompatible extension
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
32940
diff
changeset
|
209 $ cat >> .hg/hgrc <<EOF |
886207fb18ab
tests: take extra care for fsmonitor at enabling incompatible extension
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
32940
diff
changeset
|
210 > [extensions] |
886207fb18ab
tests: take extra care for fsmonitor at enabling incompatible extension
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
32940
diff
changeset
|
211 > # disable eol, because it is not needed for subsequent tests |
886207fb18ab
tests: take extra care for fsmonitor at enabling incompatible extension
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
32940
diff
changeset
|
212 > # (in addition, keeping it requires extra care for fsmonitor) |
886207fb18ab
tests: take extra care for fsmonitor at enabling incompatible extension
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
32940
diff
changeset
|
213 > eol=! |
886207fb18ab
tests: take extra care for fsmonitor at enabling incompatible extension
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
32940
diff
changeset
|
214 > EOF |
37507
9b16a67cef56
eol: look up partial nodeid as partial nodeid
Martin von Zweigbergk <martinvonz@google.com>
parents:
36740
diff
changeset
|
215 $ hg blackbox -l 5 |
34106
06eb3de47649
test-blackbox: make it compatible with chg
Jun Wu <quark@fb.com>
parents:
33425
diff
changeset
|
216 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> update (no-chg !) |
28245
caa2a0c6fbb7
blackbox: log working directory version
timeless <timeless@mozdev.org>
parents:
28242
diff
changeset
|
217 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob) |
caa2a0c6fbb7
blackbox: log working directory version
timeless <timeless@mozdev.org>
parents:
28242
diff
changeset
|
218 1970/01/01 00:00:00 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> exthook-update: echo hooked finished in * seconds (glob) |
28247
d2c0527af364
blackbox: store the blackbox ui object instead of the log file
timeless <timeless@mozdev.org>
parents:
28246
diff
changeset
|
219 1970/01/01 00:00:00 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> update exited 0 after * seconds (glob) |
34106
06eb3de47649
test-blackbox: make it compatible with chg
Jun Wu <quark@fb.com>
parents:
33425
diff
changeset
|
220 1970/01/01 00:00:00 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> serve --cmdserver chgunix --address $TESTTMP.chgsock/server.* --daemon-postexec 'chdir:/' (glob) (chg !) |
37507
9b16a67cef56
eol: look up partial nodeid as partial nodeid
Martin von Zweigbergk <martinvonz@google.com>
parents:
36740
diff
changeset
|
221 1970/01/01 00:00:00 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> blackbox -l 5 |
18674
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
222 |
19066
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
223 log rotation |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
224 |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
225 $ echo '[blackbox]' >> .hg/hgrc |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
226 $ echo 'maxsize = 20 b' >> .hg/hgrc |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
227 $ echo 'maxfiles = 3' >> .hg/hgrc |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
228 $ hg status |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
229 $ hg status |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
230 $ hg status |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
231 $ hg tip -q |
24706
5150b2b5b345
tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24705
diff
changeset
|
232 2:d02f48003e62 |
19066
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
233 $ ls .hg/blackbox.log* |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
234 .hg/blackbox.log |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
235 .hg/blackbox.log.1 |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
236 .hg/blackbox.log.2 |
28024
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
237 $ cd .. |
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
238 |
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
239 $ hg init blackboxtest3 |
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
240 $ cd blackboxtest3 |
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
241 $ hg blackbox |
34276
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
242 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> init blackboxtest3 exited 0 after * seconds (glob) |
28245
caa2a0c6fbb7
blackbox: log working directory version
timeless <timeless@mozdev.org>
parents:
28242
diff
changeset
|
243 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox |
28024
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
244 $ mv .hg/blackbox.log .hg/blackbox.log- |
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
245 $ mkdir .hg/blackbox.log |
28336
a5a13eeffc59
tests: Solaris sed does not support "\n" meaning newline in the RHS of s///
Danek Duvall <danek.duvall@oracle.com>
parents:
28248
diff
changeset
|
246 $ sed -e 's/\(.*test1.*\)/#\1/; s#\(.*commit2.*\)#os.rmdir(".hg/blackbox.log")\ |
a5a13eeffc59
tests: Solaris sed does not support "\n" meaning newline in the RHS of s///
Danek Duvall <danek.duvall@oracle.com>
parents:
28248
diff
changeset
|
247 > os.rename(".hg/blackbox.log-", ".hg/blackbox.log")\ |
a5a13eeffc59
tests: Solaris sed does not support "\n" meaning newline in the RHS of s///
Danek Duvall <danek.duvall@oracle.com>
parents:
28248
diff
changeset
|
248 > \1#' $TESTDIR/test-dispatch.py > ../test-dispatch.py |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38023
diff
changeset
|
249 $ "$PYTHON" $TESTDIR/blackbox-readonly-dispatch.py |
35724
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
250 running: --debug add foo |
35729
7415cc923613
test-blackbox: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35724
diff
changeset
|
251 warning: cannot write to blackbox.log: Is a directory (no-windows !) |
7415cc923613
test-blackbox: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35724
diff
changeset
|
252 warning: cannot write to blackbox.log: $TESTTMP/blackboxtest3/.hg/blackbox.log: Access is denied (windows !) |
35724
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
253 adding foo |
28024
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
254 result: 0 |
35724
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
255 running: --debug commit -m commit1 -d 2000-01-01 foo |
35729
7415cc923613
test-blackbox: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35724
diff
changeset
|
256 warning: cannot write to blackbox.log: Is a directory (no-windows !) |
7415cc923613
test-blackbox: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35724
diff
changeset
|
257 warning: cannot write to blackbox.log: $TESTTMP/blackboxtest3/.hg/blackbox.log: Access is denied (windows !) |
35724
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
258 committing files: |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
259 foo |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
260 committing manifest |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
261 committing changelog |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
262 updating the branch cache |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
263 committed changeset 0:0e46349438790c460c5c9f7546bfcd39b267bbd2 |
37995
6f9ac3cb0987
dispatch: unify handling of None returned by a command function
Yuya Nishihara <yuya@tcha.org>
parents:
37507
diff
changeset
|
264 result: 0 |
35724
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
265 running: --debug commit -m commit2 -d 2000-01-02 foo |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
266 committing files: |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
267 foo |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
268 committing manifest |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
269 committing changelog |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
270 updating the branch cache |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
271 committed changeset 1:45589e459b2edfbf3dbde7e01f611d2c1e7453d7 |
37995
6f9ac3cb0987
dispatch: unify handling of None returned by a command function
Yuya Nishihara <yuya@tcha.org>
parents:
37507
diff
changeset
|
272 result: 0 |
35724
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
273 running: --debug log -r 0 |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
274 changeset: 0:0e46349438790c460c5c9f7546bfcd39b267bbd2 |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
275 phase: draft |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
276 parent: -1:0000000000000000000000000000000000000000 |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
277 parent: -1:0000000000000000000000000000000000000000 |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
278 manifest: 0:9091aa5df980aea60860a2e39c95182e68d1ddec |
28024
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
279 user: test |
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
280 date: Sat Jan 01 00:00:00 2000 +0000 |
35724
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
281 files+: foo |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
282 extra: branch=default |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
283 description: |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
284 commit1 |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
285 |
28024
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
286 |
37995
6f9ac3cb0987
dispatch: unify handling of None returned by a command function
Yuya Nishihara <yuya@tcha.org>
parents:
37507
diff
changeset
|
287 result: 0 |
35724
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
288 running: --debug log -r tip |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
289 changeset: 1:45589e459b2edfbf3dbde7e01f611d2c1e7453d7 |
28024
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
290 tag: tip |
35724
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
291 phase: draft |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
292 parent: 0:0e46349438790c460c5c9f7546bfcd39b267bbd2 |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
293 parent: -1:0000000000000000000000000000000000000000 |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
294 manifest: 1:895aa9b7886f89dd017a6d62524e1f9180b04df9 |
28024
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
295 user: test |
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
296 date: Sun Jan 02 00:00:00 2000 +0000 |
35724
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
297 files: foo |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
298 extra: branch=default |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
299 description: |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
300 commit2 |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
301 |
28024
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
302 |
37995
6f9ac3cb0987
dispatch: unify handling of None returned by a command function
Yuya Nishihara <yuya@tcha.org>
parents:
37507
diff
changeset
|
303 result: 0 |
28024
142891ab6e89
tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents:
26752
diff
changeset
|
304 $ hg blackbox |
35724
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
305 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> updating the branch cache |
32266
2b6692df1bdf
caches: stop warming the cache after 'localrepo.commitctx'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31773
diff
changeset
|
306 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> updated served branch cache in * seconds (glob) |
2b6692df1bdf
caches: stop warming the cache after 'localrepo.commitctx'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31773
diff
changeset
|
307 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> wrote served branch cache with 1 labels and 1 nodes |
35724
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
308 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> --debug commit -m commit2 -d 2000-01-02 foo exited 0 after *.?? seconds (glob) |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
309 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> --debug log -r 0 |
28248
851c41a21869
blackbox: properly replace ui class
timeless <timeless@mozdev.org>
parents:
28247
diff
changeset
|
310 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> writing .hg/cache/tags2-visible with 0 tags |
35724
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
311 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> --debug log -r 0 exited 0 after *.?? seconds (glob) |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
312 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> --debug log -r tip |
853bf7d90804
blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents:
35393
diff
changeset
|
313 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> --debug log -r tip exited 0 after *.?? seconds (glob) |
28245
caa2a0c6fbb7
blackbox: log working directory version
timeless <timeless@mozdev.org>
parents:
28242
diff
changeset
|
314 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> blackbox |
19066
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
315 |
28407
63da8bd0c65e
blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents:
28406
diff
changeset
|
316 Test log recursion from dirty status check |
63da8bd0c65e
blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents:
28406
diff
changeset
|
317 |
63da8bd0c65e
blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents:
28406
diff
changeset
|
318 $ cat > ../r.py <<EOF |
63da8bd0c65e
blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents:
28406
diff
changeset
|
319 > from mercurial import context, error, extensions |
63da8bd0c65e
blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents:
28406
diff
changeset
|
320 > x=[False] |
63da8bd0c65e
blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents:
28406
diff
changeset
|
321 > def status(orig, *args, **opts): |
36740
2aff6daf7790
py3: byte-stringify test-blackbox.t
Yuya Nishihara <yuya@tcha.org>
parents:
35729
diff
changeset
|
322 > args[0].repo().ui.log(b"broken", b"recursion?") |
28407
63da8bd0c65e
blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents:
28406
diff
changeset
|
323 > return orig(*args, **opts) |
63da8bd0c65e
blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents:
28406
diff
changeset
|
324 > def reposetup(ui, repo): |
63da8bd0c65e
blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents:
28406
diff
changeset
|
325 > extensions.wrapfunction(context.basectx, 'status', status) |
63da8bd0c65e
blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents:
28406
diff
changeset
|
326 > EOF |
63da8bd0c65e
blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents:
28406
diff
changeset
|
327 $ hg id --config extensions.x=../r.py --config blackbox.dirty=True |
63da8bd0c65e
blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents:
28406
diff
changeset
|
328 45589e459b2e tip |
63da8bd0c65e
blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents:
28406
diff
changeset
|
329 |
18674
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
330 cleanup |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
331 $ cd .. |
34107 | 332 |
40797
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
333 Test missing log directory, which shouldn't be created automatically |
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
334 |
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
335 $ cat <<'EOF' > closeremove.py |
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
336 > def reposetup(ui, repo): |
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
337 > class rmrepo(repo.__class__): |
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
338 > def close(self): |
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
339 > super(rmrepo, self).close() |
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
340 > self.ui.debug(b'removing %s\n' % self.vfs.base) |
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
341 > self.vfs.rmtree() |
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
342 > repo.__class__ = rmrepo |
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
343 > EOF |
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
344 |
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
345 $ hg init gone |
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
346 $ cd gone |
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
347 $ cat <<'EOF' > .hg/hgrc |
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
348 > [extensions] |
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
349 > closeremove = ../closeremove.py |
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
350 > EOF |
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
351 $ hg log --debug |
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
352 removing $TESTTMP/gone/.hg |
40808
c460b1643eb0
tests: stabilize test-blackbox.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
40797
diff
changeset
|
353 warning: cannot write to blackbox.log: $ENOENT$ (no-windows !) |
c460b1643eb0
tests: stabilize test-blackbox.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
40797
diff
changeset
|
354 warning: cannot write to blackbox.log: $TESTTMP/gone/.hg/blackbox.log: $ENOTDIR$ (windows !) |
40797
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
355 $ cd .. |
ea2688c84e4b
blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents:
40442
diff
changeset
|
356 |
41632
31dfe7026f8d
blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents:
40992
diff
changeset
|
357 blackbox should disable itself if track is empty |
31dfe7026f8d
blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents:
40992
diff
changeset
|
358 |
31dfe7026f8d
blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents:
40992
diff
changeset
|
359 $ hg --config blackbox.track= init nothing_tracked |
31dfe7026f8d
blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents:
40992
diff
changeset
|
360 $ cd nothing_tracked |
31dfe7026f8d
blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents:
40992
diff
changeset
|
361 $ cat >> .hg/hgrc << EOF |
31dfe7026f8d
blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents:
40992
diff
changeset
|
362 > [blackbox] |
31dfe7026f8d
blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents:
40992
diff
changeset
|
363 > track = |
31dfe7026f8d
blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents:
40992
diff
changeset
|
364 > EOF |
31dfe7026f8d
blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents:
40992
diff
changeset
|
365 $ hg blackbox |
31dfe7026f8d
blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents:
40992
diff
changeset
|
366 $ cd $TESTTMP |
31dfe7026f8d
blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents:
40992
diff
changeset
|
367 |
41633
7b1b0415f8e5
blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents:
41632
diff
changeset
|
368 a '*' entry in blackbox.track is interpreted as log everything |
7b1b0415f8e5
blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents:
41632
diff
changeset
|
369 |
7b1b0415f8e5
blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents:
41632
diff
changeset
|
370 $ hg --config blackbox.track='*' \ |
7b1b0415f8e5
blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents:
41632
diff
changeset
|
371 > --config blackbox.logsource=True \ |
7b1b0415f8e5
blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents:
41632
diff
changeset
|
372 > init track_star |
7b1b0415f8e5
blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents:
41632
diff
changeset
|
373 $ cd track_star |
7b1b0415f8e5
blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents:
41632
diff
changeset
|
374 $ cat >> .hg/hgrc << EOF |
7b1b0415f8e5
blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents:
41632
diff
changeset
|
375 > [blackbox] |
7b1b0415f8e5
blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents:
41632
diff
changeset
|
376 > logsource = True |
7b1b0415f8e5
blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents:
41632
diff
changeset
|
377 > track = * |
7b1b0415f8e5
blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents:
41632
diff
changeset
|
378 > EOF |
7b1b0415f8e5
blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents:
41632
diff
changeset
|
379 (only look for entries with specific logged sources, otherwise this test is |
7b1b0415f8e5
blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents:
41632
diff
changeset
|
380 pretty brittle) |
7b1b0415f8e5
blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents:
41632
diff
changeset
|
381 $ hg blackbox | egrep '\[command(finish)?\]' |
41730
19d8d6856338
tests: glob over quoting differences in test-blackbox.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
41633
diff
changeset
|
382 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000) [commandfinish]> --config *blackbox.track=* --config *blackbox.logsource=True* init track_star exited 0 after * seconds (glob) |
41633
7b1b0415f8e5
blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents:
41632
diff
changeset
|
383 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000) [command]> blackbox |
7b1b0415f8e5
blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents:
41632
diff
changeset
|
384 $ cd $TESTTMP |
7b1b0415f8e5
blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents:
41632
diff
changeset
|
385 |
34107 | 386 #if chg |
387 | |
388 when using chg, blackbox.log should get rotated correctly | |
389 | |
390 $ cat > $TESTTMP/noop.py << EOF | |
391 > from __future__ import absolute_import | |
392 > import time | |
393 > from mercurial import registrar, scmutil | |
394 > cmdtable = {} | |
395 > command = registrar.command(cmdtable) | |
396 > @command('noop') | |
397 > def noop(ui, repo): | |
398 > pass | |
399 > EOF | |
400 | |
401 $ hg init blackbox-chg | |
402 $ cd blackbox-chg | |
403 | |
404 $ cat > .hg/hgrc << EOF | |
405 > [blackbox] | |
406 > maxsize = 500B | |
407 > [extensions] | |
408 > # extension change forces chg to restart | |
409 > noop=$TESTTMP/noop.py | |
410 > EOF | |
411 | |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38023
diff
changeset
|
412 $ "$PYTHON" -c 'print("a" * 400)' > .hg/blackbox.log |
34107 | 413 $ chg noop |
414 $ chg noop | |
415 $ chg noop | |
416 $ chg noop | |
417 $ chg noop | |
418 | |
419 $ cat > showsize.py << 'EOF' | |
40369
ef6cab7930b3
py3: fix module imports in tests, as flagged by test-check-module-imports.t
Matt Harbison <matt_harbison@yahoo.com>
parents:
39707
diff
changeset
|
420 > import os |
ef6cab7930b3
py3: fix module imports in tests, as flagged by test-check-module-imports.t
Matt Harbison <matt_harbison@yahoo.com>
parents:
39707
diff
changeset
|
421 > import sys |
34107 | 422 > limit = 500 |
423 > for p in sys.argv[1:]: | |
424 > size = os.stat(p).st_size | |
425 > if size >= limit: | |
426 > desc = '>=' | |
427 > else: | |
428 > desc = '<' | |
429 > print('%s: %s %d' % (p, desc, limit)) | |
430 > EOF | |
431 | |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38023
diff
changeset
|
432 $ "$PYTHON" showsize.py .hg/blackbox* |
34107 | 433 .hg/blackbox.log: < 500 |
434 .hg/blackbox.log.1: >= 500 | |
435 .hg/blackbox.log.2: >= 500 | |
436 | |
437 $ cd .. | |
438 | |
34299
b1d4ac068961
blackbox: do not prevent 'chg init' from working
Jun Wu <quark@fb.com>
parents:
34298
diff
changeset
|
439 With chg, blackbox should not create the log file if the repo is gone |
b1d4ac068961
blackbox: do not prevent 'chg init' from working
Jun Wu <quark@fb.com>
parents:
34298
diff
changeset
|
440 |
b1d4ac068961
blackbox: do not prevent 'chg init' from working
Jun Wu <quark@fb.com>
parents:
34298
diff
changeset
|
441 $ hg init repo1 |
b1d4ac068961
blackbox: do not prevent 'chg init' from working
Jun Wu <quark@fb.com>
parents:
34298
diff
changeset
|
442 $ hg --config extensions.a=! -R repo1 log |
b1d4ac068961
blackbox: do not prevent 'chg init' from working
Jun Wu <quark@fb.com>
parents:
34298
diff
changeset
|
443 $ rm -rf $TESTTMP/repo1 |
b1d4ac068961
blackbox: do not prevent 'chg init' from working
Jun Wu <quark@fb.com>
parents:
34298
diff
changeset
|
444 $ hg --config extensions.a=! init repo1 |
b1d4ac068961
blackbox: do not prevent 'chg init' from working
Jun Wu <quark@fb.com>
parents:
34298
diff
changeset
|
445 |
34107 | 446 #endif |
34276
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
447 |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
448 blackbox should work if repo.ui.log is not called (issue5518) |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
449 |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
450 $ cat > $TESTTMP/raise.py << EOF |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
451 > from __future__ import absolute_import |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
452 > from mercurial import registrar, scmutil |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
453 > cmdtable = {} |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
454 > command = registrar.command(cmdtable) |
36740
2aff6daf7790
py3: byte-stringify test-blackbox.t
Yuya Nishihara <yuya@tcha.org>
parents:
35729
diff
changeset
|
455 > @command(b'raise') |
34276
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
456 > def raisecmd(*args): |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
457 > raise RuntimeError('raise') |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
458 > EOF |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
459 |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
460 $ cat >> $HGRCPATH << EOF |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
461 > [blackbox] |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
462 > track = commandexception |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
463 > [extensions] |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
464 > raise=$TESTTMP/raise.py |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
465 > EOF |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
466 |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
467 $ hg init $TESTTMP/blackbox-exception-only |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
468 $ cd $TESTTMP/blackbox-exception-only |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
469 |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
470 #if chg |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
471 (chg exits 255 because it fails to receive an exit code) |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
472 $ hg raise 2>/dev/null |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
473 [255] |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
474 #else |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
475 (hg exits 1 because Python default exit code for uncaught exception is 1) |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
476 $ hg raise 2>/dev/null |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
477 [1] |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
478 #endif |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
479 |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
480 $ head -1 .hg/blackbox.log |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
481 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> ** Unknown exception encountered with possibly-broken third-party extension mock |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
482 $ tail -2 .hg/blackbox.log |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
483 RuntimeError: raise |
b90bd9a98c8b
blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents:
34107
diff
changeset
|
484 |