mercurial/commands.py
changeset 1710 c65113f3627a
parent 1661 b11507d6d16d
child 1712 21dcf38e5d7d
equal deleted inserted replaced
1709:069129d24b26 1710:c65113f3627a
   403         # synopsis
   403         # synopsis
   404         ui.write("%s\n\n" % i[2])
   404         ui.write("%s\n\n" % i[2])
   405 
   405 
   406         # description
   406         # description
   407         doc = i[0].__doc__
   407         doc = i[0].__doc__
       
   408         if not doc:
       
   409             doc = _("(No help text available)")
   408         if ui.quiet:
   410         if ui.quiet:
   409             doc = doc.splitlines(0)[0]
   411             doc = doc.splitlines(0)[0]
   410         ui.write("%s\n" % doc.rstrip())
   412         ui.write("%s\n" % doc.rstrip())
   411 
   413 
   412         if not ui.quiet:
   414         if not ui.quiet:
   444                 continue
   446                 continue
   445             f = f.lstrip("^")
   447             f = f.lstrip("^")
   446             if not ui.debugflag and f.startswith("debug"):
   448             if not ui.debugflag and f.startswith("debug"):
   447                 continue
   449                 continue
   448             d = ""
   450             d = ""
   449             if e[0].__doc__:
   451             doc = e[0].__doc__
   450                 d = e[0].__doc__.splitlines(0)[0].rstrip()
   452             if not doc:
   451             h[f] = d
   453                 doc = _("(No help text available)")
       
   454             h[f] = doc.splitlines(0)[0].rstrip()
   452             cmds[f] = c.lstrip("^")
   455             cmds[f] = c.lstrip("^")
   453 
   456 
   454         fns = h.keys()
   457         fns = h.keys()
   455         fns.sort()
   458         fns.sort()
   456         m = max(map(len, fns))
   459         m = max(map(len, fns))