Mercurial > hg-stable
changeset 9280:b694531a5aa7
commands: Check if helptext contains a newline before we split
author | David Soria Parra <dsp@php.net> |
---|---|
date | Mon, 27 Jul 2009 02:12:17 +0200 |
parents | ca143d86727c |
children | 2a4131b264c3 |
files | mercurial/commands.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Sun Jul 26 02:33:38 2009 +0200 +++ b/mercurial/commands.py Mon Jul 27 02:12:17 2009 +0200 @@ -1555,7 +1555,10 @@ raise error.UnknownCommand(name) doc = gettext(mod.__doc__) or _('no help text available') - head, tail = doc.split('\n', 1) + if '\n' not in doc: + head, tail = doc, "" + else: + head, tail = doc.split('\n', 1) ui.write(_('%s extension - %s\n\n') % (name.split('.')[-1], head)) if tail: ui.write(minirst.format(tail, textwidth))