Show More
@@ -1,3 +1,31 b'' | |||||
|
1 | ensure that failing ui.atexit handlers report sensibly | |||
|
2 | ||||
|
3 | $ cat > $TESTTMP/bailatexit.py <<EOF | |||
|
4 | > from mercurial import util | |||
|
5 | > def bail(): | |||
|
6 | > raise RuntimeError('ui.atexit handler exception') | |||
|
7 | > | |||
|
8 | > def extsetup(ui): | |||
|
9 | > ui.atexit(bail) | |||
|
10 | > EOF | |||
|
11 | $ hg -q --config extensions.bailatexit=$TESTTMP/bailatexit.py \ | |||
|
12 | > help help | |||
|
13 | hg help [-ecks] [TOPIC] | |||
|
14 | ||||
|
15 | show help for a given topic or a help overview | |||
|
16 | error in exit handlers: | |||
|
17 | Traceback (most recent call last): | |||
|
18 | File "*/mercurial/dispatch.py", line *, in _runexithandlers (glob) | |||
|
19 | func(*args, **kwargs) | |||
|
20 | File "$TESTTMP/bailatexit.py", line *, in bail (glob) | |||
|
21 | raise RuntimeError('ui.atexit handler exception') | |||
|
22 | RuntimeError: ui.atexit handler exception | |||
|
23 | [255] | |||
|
24 | ||||
|
25 | $ rm $TESTTMP/bailatexit.py | |||
|
26 | ||||
|
27 | another bad extension | |||
|
28 | ||||
1 |
$ |
|
29 | $ echo 'raise Exception("bit bucket overflow")' > badext.py | |
2 |
$ |
|
30 | $ abspathexc=`pwd`/badext.py | |
3 |
|
31 |
General Comments 0
You need to be logged in to leave comments.
Login now