# HG changeset patch # User Thomas Arendsen Hein # Date 1139472439 -3600 # Node ID c65113f3627aaaa44c76495800c1940843109163 # Parent 069129d24b26158fe3c55a0b3ff744b0fe6921b4 Show "(No help text available)" for commands without doc string. Currently this only occurs with "hg help qcommit" from mq extension. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -405,6 +405,8 @@ def help_(ui, cmd=None, with_version=Fal # 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 @@ def help_(ui, cmd=None, with_version=Fal 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()