Mercurial > hg-stable
changeset 11236:cfa6a726ef6d stable
record: better way to find help in docstring
This outputs only the lines in the verbatim block without relying on
the translator to have translated the little 'y - record this change'
string.
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Mon, 31 May 2010 13:43:03 +0200 |
parents | 113536751190 |
children | feb2a58fc592 |
files | hgext/record.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/record.py Mon May 31 14:48:26 2010 +0900 +++ b/hgext/record.py Mon May 31 13:43:03 2010 +0200 @@ -295,9 +295,9 @@ r = ui.promptchoice("%s %s" % (query, resps), choices) if r == 7: # ? doc = gettext(record.__doc__) - c = doc.find(_('y - record this change')) + c = doc.find('::') + 2 for l in doc[c:].splitlines(): - if l: + if l.startswith(' '): ui.write(l.strip(), '\n') continue elif r == 0: # yes