mercurial/dispatch.py
changeset 45884 98399dd1b96c
parent 45882 8cc9e7f762d6
child 45885 600aec73f309
equal deleted inserted replaced
45883:1817b66897ad 45884:98399dd1b96c
   259             ferr.write(_(b"abort: %s\n") % inst.message)
   259             ferr.write(_(b"abort: %s\n") % inst.message)
   260             if inst.hint:
   260             if inst.hint:
   261                 ferr.write(_(b"(%s)\n") % inst.hint)
   261                 ferr.write(_(b"(%s)\n") % inst.hint)
   262             return -1
   262             return -1
   263         except error.ParseError as inst:
   263         except error.ParseError as inst:
   264             scmutil.formatparse(ferr.write, inst)
   264             ferr.write(inst.format())
   265             return -1
   265             return -1
   266 
   266 
   267         msg = _formatargs(req.args)
   267         msg = _formatargs(req.args)
   268         starttime = util.timer()
   268         starttime = util.timer()
   269         ret = 1  # default of Python exit code on unhandled exception
   269         ret = 1  # default of Python exit code on unhandled exception
   467             commands.help_(ui, inst.command, full=False, command=True)
   467             commands.help_(ui, inst.command, full=False, command=True)
   468         else:
   468         else:
   469             ui.warn(_(b"hg: %s\n") % inst.message)
   469             ui.warn(_(b"hg: %s\n") % inst.message)
   470             ui.warn(_(b"(use 'hg help -v' for a list of global options)\n"))
   470             ui.warn(_(b"(use 'hg help -v' for a list of global options)\n"))
   471     except error.ParseError as inst:
   471     except error.ParseError as inst:
   472         scmutil.formatparse(ui.warn, inst)
   472         ui.warn(inst.format())
   473         return -1
   473         return -1
   474     except error.UnknownCommand as inst:
   474     except error.UnknownCommand as inst:
   475         nocmdmsg = _(b"hg: unknown command '%s'\n") % inst.command
   475         nocmdmsg = _(b"hg: unknown command '%s'\n") % inst.command
   476         try:
   476         try:
   477             # check if the command is in a disabled extension
   477             # check if the command is in a disabled extension