comparison hgext/record.py @ 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
comparison
equal deleted inserted replaced
11235:113536751190 11236:cfa6a726ef6d
293 _('&Quit, recording no changes'), 293 _('&Quit, recording no changes'),
294 _('&?')) 294 _('&?'))
295 r = ui.promptchoice("%s %s" % (query, resps), choices) 295 r = ui.promptchoice("%s %s" % (query, resps), choices)
296 if r == 7: # ? 296 if r == 7: # ?
297 doc = gettext(record.__doc__) 297 doc = gettext(record.__doc__)
298 c = doc.find(_('y - record this change')) 298 c = doc.find('::') + 2
299 for l in doc[c:].splitlines(): 299 for l in doc[c:].splitlines():
300 if l: 300 if l.startswith(' '):
301 ui.write(l.strip(), '\n') 301 ui.write(l.strip(), '\n')
302 continue 302 continue
303 elif r == 0: # yes 303 elif r == 0: # yes
304 ret = True 304 ret = True
305 elif r == 1: # no 305 elif r == 1: # no