##// END OF EJS Templates
alias: change return code of bad definition to 255...
Yuya Nishihara -
r21572:6c9b7712 stable
parent child Browse files
Show More
@@ -355,7 +355,7 b' class cmdalias(object):'
355 355 if not self.definition:
356 356 def fn(ui, *args):
357 357 ui.warn(_("no definition for alias '%s'\n") % self.name)
358 return 1
358 return -1
359 359 self.fn = fn
360 360 self.badalias = True
361 361 return
@@ -389,7 +389,7 b' class cmdalias(object):'
389 389 def fn(ui, *args):
390 390 ui.warn(_("error in definition for alias '%s': %s\n")
391 391 % (self.name, inst))
392 return 1
392 return -1
393 393 self.fn = fn
394 394 self.badalias = True
395 395 return
@@ -402,7 +402,7 b' class cmdalias(object):'
402 402 ui.warn(_("error in definition for alias '%s': %s may only "
403 403 "be given on the command line\n")
404 404 % (self.name, invalidarg))
405 return 1
405 return -1
406 406
407 407 self.fn = fn
408 408 self.badalias = True
@@ -434,14 +434,14 b' class cmdalias(object):'
434 434 commands.help_(ui, cmd, unknowncmd=True)
435 435 except error.UnknownCommand:
436 436 pass
437 return 1
437 return -1
438 438 self.fn = fn
439 439 self.badalias = True
440 440 except error.AmbiguousCommand:
441 441 def fn(ui, *args):
442 442 ui.warn(_("alias '%s' resolves to ambiguous command '%s'\n") \
443 443 % (self.name, cmd))
444 return 1
444 return -1
445 445 self.fn = fn
446 446 self.badalias = True
447 447
@@ -61,7 +61,7 b' unknown'
61 61
62 62 $ hg unknown
63 63 alias 'unknown' resolves to unknown command 'bargle'
64 [1]
64 [255]
65 65 $ hg help unknown
66 66 alias 'unknown' resolves to unknown command 'bargle'
67 67
@@ -70,7 +70,7 b' ambiguous'
70 70
71 71 $ hg ambiguous
72 72 alias 'ambiguous' resolves to ambiguous command 's'
73 [1]
73 [255]
74 74 $ hg help ambiguous
75 75 alias 'ambiguous' resolves to ambiguous command 's'
76 76
@@ -79,7 +79,7 b' recursive'
79 79
80 80 $ hg recursive
81 81 alias 'recursive' resolves to unknown command 'recursive'
82 [1]
82 [255]
83 83 $ hg help recursive
84 84 alias 'recursive' resolves to unknown command 'recursive'
85 85
@@ -88,7 +88,7 b' no definition'
88 88
89 89 $ hg nodef
90 90 no definition for alias 'nodefinition'
91 [1]
91 [255]
92 92 $ hg help nodef
93 93 no definition for alias 'nodefinition'
94 94
@@ -97,7 +97,7 b' no closing quotation'
97 97
98 98 $ hg noclosing
99 99 error in definition for alias 'noclosingquotation': No closing quotation
100 [1]
100 [255]
101 101 $ hg help noclosing
102 102 error in definition for alias 'noclosingquotation': No closing quotation
103 103
@@ -106,27 +106,27 b' invalid options'
106 106
107 107 $ hg no--cwd
108 108 error in definition for alias 'no--cwd': --cwd may only be given on the command line
109 [1]
109 [255]
110 110 $ hg help no--cwd
111 111 error in definition for alias 'no--cwd': --cwd may only be given on the command line
112 112 $ hg no-R
113 113 error in definition for alias 'no-R': -R may only be given on the command line
114 [1]
114 [255]
115 115 $ hg help no-R
116 116 error in definition for alias 'no-R': -R may only be given on the command line
117 117 $ hg no--repo
118 118 error in definition for alias 'no--repo': --repo may only be given on the command line
119 [1]
119 [255]
120 120 $ hg help no--repo
121 121 error in definition for alias 'no--repo': --repo may only be given on the command line
122 122 $ hg no--repository
123 123 error in definition for alias 'no--repository': --repository may only be given on the command line
124 [1]
124 [255]
125 125 $ hg help no--repository
126 126 error in definition for alias 'no--repository': --repository may only be given on the command line
127 127 $ hg no--config
128 128 error in definition for alias 'no--config': --config may only be given on the command line
129 [1]
129 [255]
130 130
131 131 optional repository
132 132
General Comments 0
You need to be logged in to leave comments. Login now