Show More
@@ -1,13 +1,26 b'' | |||||
1 | setup |
|
1 | setup | |
|
2 | ||||
|
3 | $ cat > myextension.py <<EOF | |||
|
4 | > from mercurial import error, registrar | |||
|
5 | > cmdtable = {} | |||
|
6 | > command = registrar.command(cmdtable) | |||
|
7 | > @command(b'crash', [], b'hg crash') | |||
|
8 | > def crash(ui, *args, **kwargs): | |||
|
9 | > raise Exception("oops") | |||
|
10 | > EOF | |||
|
11 | $ abspath=`pwd`/myextension.py | |||
|
12 | ||||
2 |
$ |
|
13 | $ cat >> $HGRCPATH <<EOF | |
3 | > [extensions] |
|
14 | > [extensions] | |
4 | > blackbox= |
|
15 | > blackbox= | |
5 |
> mock=$ |
|
16 | > mock=$TESTDIR/mockblackbox.py | |
6 | > mq= |
|
17 | > mq= | |
|
18 | > myextension=$TESTTMP/myextension.py | |||
7 | > [alias] |
|
19 | > [alias] | |
8 | > confuse = log --limit 3 |
|
20 | > confuse = log --limit 3 | |
9 | > so-confusing = confuse --style compact |
|
21 | > so-confusing = confuse --style compact | |
10 | > EOF |
|
22 | > EOF | |
|
23 | ||||
11 | $ hg init blackboxtest |
|
24 | $ hg init blackboxtest | |
12 | $ cd blackboxtest |
|
25 | $ cd blackboxtest | |
13 |
|
26 | |||
@@ -21,6 +34,24 b' command, exit codes, and duration' | |||||
21 | 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> add a exited 0 after * seconds (glob) |
|
34 | 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> add a exited 0 after * seconds (glob) | |
22 | 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000+ (5000)> blackbox --config *blackbox.dirty=True* (glob) |
|
35 | 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000+ (5000)> blackbox --config *blackbox.dirty=True* (glob) | |
23 |
|
36 | |||
|
37 | failure exit code | |||
|
38 | $ rm ./.hg/blackbox.log | |||
|
39 | $ hg add non-existent | |||
|
40 | non-existent: $ENOENT$ | |||
|
41 | [1] | |||
|
42 | $ hg blackbox | |||
|
43 | 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> add non-existent | |||
|
44 | 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> add non-existent exited 1 after * seconds (glob) | |||
|
45 | 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox | |||
|
46 | ||||
|
47 | unhandled exception | |||
|
48 | $ rm ./.hg/blackbox.log | |||
|
49 | $ hg crash 2> /dev/null | |||
|
50 | [1] | |||
|
51 | $ hg blackbox -l 2 | |||
|
52 | 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> crash exited -1 after * seconds (glob) | |||
|
53 | 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox -l 2 | |||
|
54 | ||||
24 | alias expansion is logged |
|
55 | alias expansion is logged | |
25 | $ rm ./.hg/blackbox.log |
|
56 | $ rm ./.hg/blackbox.log | |
26 | $ hg confuse |
|
57 | $ hg confuse |
General Comments 0
You need to be logged in to leave comments.
Login now