##// END OF EJS Templates
errors: raise ConfigError on bad alias definition...
Martin von Zweigbergk -
r46524:35ab6e39 default
parent child Browse files
Show More
@@ -694,7 +694,7 b' class cmdalias(object):'
694 694 hint = _(b"'%s' is provided by '%s' extension") % (cmd, ext)
695 695 except error.UnknownCommand:
696 696 pass
697 raise error.Abort(self.badalias, hint=hint)
697 raise error.ConfigError(self.badalias, hint=hint)
698 698 if self.shadows:
699 699 ui.debug(
700 700 b"alias '%s' shadows command '%s'\n" % (self.name, self.cmdname)
@@ -208,8 +208,8 b' help'
208 208 unknown
209 209
210 210 $ hg unknown
211 abort: alias 'unknown' resolves to unknown command 'bargle'
212 [255]
211 config error: alias 'unknown' resolves to unknown command 'bargle'
212 [30]
213 213 $ hg help unknown
214 214 alias 'unknown' resolves to unknown command 'bargle'
215 215
@@ -217,8 +217,8 b' unknown'
217 217 ambiguous
218 218
219 219 $ hg ambiguous
220 abort: alias 'ambiguous' resolves to ambiguous command 's'
221 [255]
220 config error: alias 'ambiguous' resolves to ambiguous command 's'
221 [30]
222 222 $ hg help ambiguous
223 223 alias 'ambiguous' resolves to ambiguous command 's'
224 224
@@ -226,8 +226,8 b' ambiguous'
226 226 recursive
227 227
228 228 $ hg recursive
229 abort: alias 'recursive' resolves to unknown command 'recursive'
230 [255]
229 config error: alias 'recursive' resolves to unknown command 'recursive'
230 [30]
231 231 $ hg help recursive
232 232 alias 'recursive' resolves to unknown command 'recursive'
233 233
@@ -235,9 +235,9 b' recursive'
235 235 disabled
236 236
237 237 $ hg disabled
238 abort: alias 'disabled' resolves to unknown command 'email'
238 config error: alias 'disabled' resolves to unknown command 'email'
239 239 ('email' is provided by 'patchbomb' extension)
240 [255]
240 [30]
241 241 $ hg help disabled
242 242 alias 'disabled' resolves to unknown command 'email'
243 243
@@ -251,8 +251,8 b' disabled'
251 251 no definition
252 252
253 253 $ hg nodef
254 abort: no definition for alias 'nodefinition'
255 [255]
254 config error: no definition for alias 'nodefinition'
255 [30]
256 256 $ hg help nodef
257 257 no definition for alias 'nodefinition'
258 258
@@ -260,8 +260,8 b' no definition'
260 260 no closing quotation
261 261
262 262 $ hg noclosing
263 abort: error in definition for alias 'noclosingquotation': No closing quotation
264 [255]
263 config error: error in definition for alias 'noclosingquotation': No closing quotation
264 [30]
265 265 $ hg help noclosing
266 266 error in definition for alias 'noclosingquotation': No closing quotation
267 267
@@ -275,37 +275,37 b' no closing quotation'
275 275 invalid options
276 276
277 277 $ hg no--cwd
278 abort: error in definition for alias 'no--cwd': --cwd may only be given on the command line
279 [255]
278 config error: error in definition for alias 'no--cwd': --cwd may only be given on the command line
279 [30]
280 280 $ hg help no--cwd
281 281 error in definition for alias 'no--cwd': --cwd may only be given on the
282 282 command line
283 283 $ hg no-R
284 abort: error in definition for alias 'no-R': -R may only be given on the command line
285 [255]
284 config error: error in definition for alias 'no-R': -R may only be given on the command line
285 [30]
286 286 $ hg help no-R
287 287 error in definition for alias 'no-R': -R may only be given on the command line
288 288 $ hg no--repo
289 abort: error in definition for alias 'no--repo': --repo may only be given on the command line
290 [255]
289 config error: error in definition for alias 'no--repo': --repo may only be given on the command line
290 [30]
291 291 $ hg help no--repo
292 292 error in definition for alias 'no--repo': --repo may only be given on the
293 293 command line
294 294 $ hg no--repository
295 abort: error in definition for alias 'no--repository': --repository may only be given on the command line
296 [255]
295 config error: error in definition for alias 'no--repository': --repository may only be given on the command line
296 [30]
297 297 $ hg help no--repository
298 298 error in definition for alias 'no--repository': --repository may only be given
299 299 on the command line
300 300 $ hg no--config
301 abort: error in definition for alias 'no--config': --config may only be given on the command line
302 [255]
301 config error: error in definition for alias 'no--config': --config may only be given on the command line
302 [30]
303 303 $ hg no --config alias.no='--repo elsewhere --cwd elsewhere status'
304 abort: error in definition for alias 'no': --repo/--cwd may only be given on the command line
305 [255]
304 config error: error in definition for alias 'no': --repo/--cwd may only be given on the command line
305 [30]
306 306 $ hg no --config alias.no='--repo elsewhere'
307 abort: error in definition for alias 'no': --repo may only be given on the command line
308 [255]
307 config error: error in definition for alias 'no': --repo may only be given on the command line
308 [30]
309 309
310 310 optional repository
311 311
@@ -631,11 +631,11 b' invalid character in user-specified help'
631 631 $ hg help invalidhelp
632 632 non-ASCII character in alias definition 'invalidhelp:help'
633 633 $ hg invaliddoc
634 abort: non-ASCII character in alias definition 'invaliddoc:doc'
635 [255]
634 config error: non-ASCII character in alias definition 'invaliddoc:doc'
635 [30]
636 636 $ hg invalidhelp
637 abort: non-ASCII character in alias definition 'invalidhelp:help'
638 [255]
637 config error: non-ASCII character in alias definition 'invalidhelp:help'
638 [30]
639 639
640 640 invalid arguments
641 641
General Comments 0
You need to be logged in to leave comments. Login now