Show More
@@ -518,6 +518,8 b' class chgcmdserver(commandserver.server)' | |||||
518 | except error.Abort as inst: |
|
518 | except error.Abort as inst: | |
519 | if isinstance(inst, error.InputError): |
|
519 | if isinstance(inst, error.InputError): | |
520 | detailed_exit_code = 10 |
|
520 | detailed_exit_code = 10 | |
|
521 | elif isinstance(inst, error.ConfigError): | |||
|
522 | detailed_exit_code = 30 | |||
521 | self.ui.error(inst.format()) |
|
523 | self.ui.error(inst.format()) | |
522 | errorraised = True |
|
524 | errorraised = True | |
523 |
|
525 |
@@ -30,7 +30,7 b' ill-formed config' | |||||
30 | $ echo '=brokenconfig' >> $HGRCPATH |
|
30 | $ echo '=brokenconfig' >> $HGRCPATH | |
31 | $ chg status |
|
31 | $ chg status | |
32 | config error at * =brokenconfig (glob) |
|
32 | config error at * =brokenconfig (glob) | |
33 |
[ |
|
33 | [30] | |
34 |
|
34 | |||
35 | $ cp $HGRCPATH.orig $HGRCPATH |
|
35 | $ cp $HGRCPATH.orig $HGRCPATH | |
36 |
|
36 |
@@ -6,59 +6,35 b' Invalid syntax: no value' | |||||
6 | $ cat > .hg/hgrc << EOF |
|
6 | $ cat > .hg/hgrc << EOF | |
7 | > novaluekey |
|
7 | > novaluekey | |
8 | > EOF |
|
8 | > EOF | |
9 | #if chg |
|
|||
10 | $ hg showconfig |
|
|||
11 | config error at $TESTTMP/.hg/hgrc:1: novaluekey |
|
|||
12 | [255] |
|
|||
13 | #else |
|
|||
14 |
$ |
|
9 | $ hg showconfig | |
15 | config error at $TESTTMP/.hg/hgrc:1: novaluekey |
|
10 | config error at $TESTTMP/.hg/hgrc:1: novaluekey | |
16 | [30] |
|
11 | [30] | |
17 | #endif |
|
|||
18 |
|
|
12 | ||
19 | Invalid syntax: no key |
|
13 | Invalid syntax: no key | |
20 |
|
14 | |||
21 | $ cat > .hg/hgrc << EOF |
|
15 | $ cat > .hg/hgrc << EOF | |
22 | > =nokeyvalue |
|
16 | > =nokeyvalue | |
23 | > EOF |
|
17 | > EOF | |
24 | #if chg |
|
|||
25 | $ hg showconfig |
|
|||
26 | config error at $TESTTMP/.hg/hgrc:1: =nokeyvalue |
|
|||
27 | [255] |
|
|||
28 | #else |
|
|||
29 |
$ |
|
18 | $ hg showconfig | |
30 | config error at $TESTTMP/.hg/hgrc:1: =nokeyvalue |
|
19 | config error at $TESTTMP/.hg/hgrc:1: =nokeyvalue | |
31 | [30] |
|
20 | [30] | |
32 | #endif |
|
|||
33 |
|
|
21 | ||
34 | Test hint about invalid syntax from leading white space |
|
22 | Test hint about invalid syntax from leading white space | |
35 |
|
23 | |||
36 | $ cat > .hg/hgrc << EOF |
|
24 | $ cat > .hg/hgrc << EOF | |
37 | > key=value |
|
25 | > key=value | |
38 | > EOF |
|
26 | > EOF | |
39 | #if chg |
|
|||
40 | $ hg showconfig |
|
|||
41 | config error at $TESTTMP/.hg/hgrc:1: unexpected leading whitespace: key=value |
|
|||
42 | [255] |
|
|||
43 | #else |
|
|||
44 | $ hg showconfig |
|
27 | $ hg showconfig | |
45 | config error at $TESTTMP/.hg/hgrc:1: unexpected leading whitespace: key=value |
|
28 | config error at $TESTTMP/.hg/hgrc:1: unexpected leading whitespace: key=value | |
46 | [30] |
|
29 | [30] | |
47 | #endif |
|
|||
48 |
|
|
30 | ||
49 | $ cat > .hg/hgrc << EOF |
|
31 | $ cat > .hg/hgrc << EOF | |
50 | > [section] |
|
32 | > [section] | |
51 | > key=value |
|
33 | > key=value | |
52 | > EOF |
|
34 | > EOF | |
53 | #if chg |
|
|||
54 | $ hg showconfig |
|
|||
55 | config error at $TESTTMP/.hg/hgrc:1: unexpected leading whitespace: [section] |
|
|||
56 | [255] |
|
|||
57 | #else |
|
|||
58 |
$ |
|
35 | $ hg showconfig | |
59 | config error at $TESTTMP/.hg/hgrc:1: unexpected leading whitespace: [section] |
|
36 | config error at $TESTTMP/.hg/hgrc:1: unexpected leading whitespace: [section] | |
60 | [30] |
|
37 | [30] | |
61 | #endif |
|
|||
62 |
|
|
38 | ||
63 | Reset hgrc |
|
39 | Reset hgrc | |
64 |
|
40 |
General Comments 0
You need to be logged in to leave comments.
Login now