record: better way to find help in docstring stable
authorMartin Geisler <mg@aragost.com>
Mon, 31 May 2010 13:43:03 +0200
branchstable
changeset 11236 cfa6a726ef6d
parent 11235 113536751190
child 11237 feb2a58fc592
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.
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