mercurial/help.py
changeset 26587 56b2bcea2529
parent 26436 a2291c9c85a1
child 26845 7a77ee434179
equal deleted inserted replaced
26586:d51c658d3f04 26587:56b2bcea2529
   500                 rst.extend(minirst.maketable(sorted(matches[t]), 1))
   500                 rst.extend(minirst.maketable(sorted(matches[t]), 1))
   501                 rst.append('\n')
   501                 rst.append('\n')
   502         if not rst:
   502         if not rst:
   503             msg = _('no matches')
   503             msg = _('no matches')
   504             hint = _('try "hg help" for a list of topics')
   504             hint = _('try "hg help" for a list of topics')
   505             raise util.Abort(msg, hint=hint)
   505             raise error.Abort(msg, hint=hint)
   506     elif name and name != 'shortlist':
   506     elif name and name != 'shortlist':
   507         queries = []
   507         queries = []
   508         if unknowncmd:
   508         if unknowncmd:
   509             queries += [helpextcmd]
   509             queries += [helpextcmd]
   510         if opts.get('extension'):
   510         if opts.get('extension'):
   523             if unknowncmd:
   523             if unknowncmd:
   524                 raise error.UnknownCommand(name)
   524                 raise error.UnknownCommand(name)
   525             else:
   525             else:
   526                 msg = _('no such help topic: %s') % name
   526                 msg = _('no such help topic: %s') % name
   527                 hint = _('try "hg help --keyword %s"') % name
   527                 hint = _('try "hg help --keyword %s"') % name
   528                 raise util.Abort(msg, hint=hint)
   528                 raise error.Abort(msg, hint=hint)
   529     else:
   529     else:
   530         # program name
   530         # program name
   531         if not ui.quiet:
   531         if not ui.quiet:
   532             rst = [_("Mercurial Distributed SCM\n"), '\n']
   532             rst = [_("Mercurial Distributed SCM\n"), '\n']
   533         rst.extend(helplist())
   533         rst.extend(helplist())