Mercurial > hg-stable
changeset 1710:c65113f3627a
Show "(No help text available)" for commands without doc string.
Currently this only occurs with "hg help qcommit" from mq extension.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Thu, 09 Feb 2006 09:07:19 +0100 |
parents | 069129d24b26 |
children | 8959700c2b19 |
files | mercurial/commands.py |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Thu Feb 09 07:24:34 2006 +0100 +++ b/mercurial/commands.py Thu Feb 09 09:07:19 2006 +0100 @@ -405,6 +405,8 @@ # description doc = i[0].__doc__ + if not doc: + doc = _("(No help text available)") if ui.quiet: doc = doc.splitlines(0)[0] ui.write("%s\n" % doc.rstrip()) @@ -446,9 +448,10 @@ if not ui.debugflag and f.startswith("debug"): continue d = "" - if e[0].__doc__: - d = e[0].__doc__.splitlines(0)[0].rstrip() - h[f] = d + doc = e[0].__doc__ + if not doc: + doc = _("(No help text available)") + h[f] = doc.splitlines(0)[0].rstrip() cmds[f] = c.lstrip("^") fns = h.keys()