mercurial/commands.py
changeset 9136 31177742f54a
parent 9102 bbc78cb1bf15
child 9142 63cfacb7917e
equal deleted inserted replaced
9135:df881932362f 9136:31177742f54a
  1446         # description
  1446         # description
  1447         doc = gettext(i[0].__doc__)
  1447         doc = gettext(i[0].__doc__)
  1448         if not doc:
  1448         if not doc:
  1449             doc = _("(no help text available)")
  1449             doc = _("(no help text available)")
  1450         if ui.quiet:
  1450         if ui.quiet:
  1451             doc = doc.splitlines(0)[0]
  1451             doc = doc.splitlines()[0]
  1452         ui.write("\n%s\n" % doc.rstrip())
  1452         ui.write("\n%s\n" % doc.rstrip())
  1453 
  1453 
  1454         if not ui.quiet:
  1454         if not ui.quiet:
  1455             # options
  1455             # options
  1456             if i[1]:
  1456             if i[1]:
  1474             if not ui.debugflag and f.startswith("debug"):
  1474             if not ui.debugflag and f.startswith("debug"):
  1475                 continue
  1475                 continue
  1476             doc = gettext(e[0].__doc__)
  1476             doc = gettext(e[0].__doc__)
  1477             if not doc:
  1477             if not doc:
  1478                 doc = _("(no help text available)")
  1478                 doc = _("(no help text available)")
  1479             h[f] = doc.splitlines(0)[0].rstrip()
  1479             h[f] = doc.splitlines()[0].rstrip()
  1480             cmds[f] = c.lstrip("^")
  1480             cmds[f] = c.lstrip("^")
  1481 
  1481 
  1482         if not h:
  1482         if not h:
  1483             ui.status(_('no commands defined\n'))
  1483             ui.status(_('no commands defined\n'))
  1484             return
  1484             return
  1521             mod = extensions.find(name)
  1521             mod = extensions.find(name)
  1522         except KeyError:
  1522         except KeyError:
  1523             raise error.UnknownCommand(name)
  1523             raise error.UnknownCommand(name)
  1524 
  1524 
  1525         doc = gettext(mod.__doc__) or _('no help text available')
  1525         doc = gettext(mod.__doc__) or _('no help text available')
  1526         doc = doc.splitlines(0)
  1526         doc = doc.splitlines()
  1527         ui.write(_('%s extension - %s\n') % (name.split('.')[-1], doc[0]))
  1527         ui.write(_('%s extension - %s\n') % (name.split('.')[-1], doc[0]))
  1528         for d in doc[1:]:
  1528         for d in doc[1:]:
  1529             ui.write(d, '\n')
  1529             ui.write(d, '\n')
  1530 
  1530 
  1531         ui.status('\n')
  1531         ui.status('\n')