# HG changeset patch # User Martin Geisler # Date 1275306183 -7200 # Node ID cfa6a726ef6d3e977eaf4ee09c9644a8f70c92e1 # Parent 1135367511909bed748c5dd1b0c7ad9682a84b6e 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. diff -r 113536751190 -r cfa6a726ef6d hgext/record.py --- 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