##// END OF EJS Templates
alias: fail gracefully when invalid global options are given (issue2442)...
Steve Losh -
r12748:d10369fe default
parent child Browse files
Show More
@@ -433,7 +433,11 b' def _checkshellalias(ui, args):'
433 cwd = os.getcwd()
433 cwd = os.getcwd()
434 norepo = commands.norepo
434 norepo = commands.norepo
435 options = {}
435 options = {}
436 args = fancyopts.fancyopts(args, commands.globalopts, options)
436
437 try:
438 args = fancyopts.fancyopts(args, commands.globalopts, options)
439 except fancyopts.getopt.GetoptError:
440 return
437
441
438 if not args:
442 if not args:
439 return
443 return
@@ -261,3 +261,85 b' invalid arguments'
261
261
262 use "hg -v help rt" to show global options
262 use "hg -v help rt" to show global options
263 [255]
263 [255]
264
265 invalid global arguments for normal commands, aliases, and shell aliases
266
267 $ hg --invalid root
268 hg: option --invalid not recognized
269 Mercurial Distributed SCM
270
271 basic commands:
272
273 add add the specified files on the next commit
274 annotate show changeset information by line for each file
275 clone make a copy of an existing repository
276 commit commit the specified files or all outstanding changes
277 diff diff repository (or selected files)
278 export dump the header and diffs for one or more changesets
279 forget forget the specified files on the next commit
280 init create a new repository in the given directory
281 log show revision history of entire repository or files
282 merge merge working directory with another revision
283 pull pull changes from the specified source
284 push push changes to the specified destination
285 remove remove the specified files on the next commit
286 serve start stand-alone webserver
287 status show changed files in the working directory
288 summary summarize working directory state
289 update update working directory (or switch revisions)
290
291 use "hg help" for the full list of commands or "hg -v" for details
292 [255]
293 $ hg --invalid mylog
294 hg: option --invalid not recognized
295 Mercurial Distributed SCM
296
297 basic commands:
298
299 add add the specified files on the next commit
300 annotate show changeset information by line for each file
301 clone make a copy of an existing repository
302 commit commit the specified files or all outstanding changes
303 diff diff repository (or selected files)
304 export dump the header and diffs for one or more changesets
305 forget forget the specified files on the next commit
306 init create a new repository in the given directory
307 log show revision history of entire repository or files
308 merge merge working directory with another revision
309 pull pull changes from the specified source
310 push push changes to the specified destination
311 remove remove the specified files on the next commit
312 serve start stand-alone webserver
313 status show changed files in the working directory
314 summary summarize working directory state
315 update update working directory (or switch revisions)
316
317 use "hg help" for the full list of commands or "hg -v" for details
318 [255]
319 $ hg --invalid blank
320 hg: option --invalid not recognized
321 Mercurial Distributed SCM
322
323 basic commands:
324
325 add add the specified files on the next commit
326 annotate show changeset information by line for each file
327 clone make a copy of an existing repository
328 commit commit the specified files or all outstanding changes
329 diff diff repository (or selected files)
330 export dump the header and diffs for one or more changesets
331 forget forget the specified files on the next commit
332 init create a new repository in the given directory
333 log show revision history of entire repository or files
334 merge merge working directory with another revision
335 pull pull changes from the specified source
336 push push changes to the specified destination
337 remove remove the specified files on the next commit
338 serve start stand-alone webserver
339 status show changed files in the working directory
340 summary summarize working directory state
341 update update working directory (or switch revisions)
342
343 use "hg help" for the full list of commands or "hg -v" for details
344 [255]
345
General Comments 0
You need to be logged in to leave comments. Login now