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