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.
--- 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