Mercurial > hg
comparison mercurial/help.py @ 16816:d10994f1c7a2
help: inline helper function used once only
author | Olav Reinert <seroton10@gmail.com> |
---|---|
date | Fri, 01 Jun 2012 12:01:33 +0200 |
parents | e740746ea557 |
children | 4594729c61ee |
comparison
equal
deleted
inserted
replaced
16815:e740746ea557 | 16816:d10994f1c7a2 |
---|---|
59 | 59 |
60 if multioccur: | 60 if multioccur: |
61 rst.append(_("\n[+] marked option can be specified multiple times\n")) | 61 rst.append(_("\n[+] marked option can be specified multiple times\n")) |
62 | 62 |
63 return ''.join(rst) | 63 return ''.join(rst) |
64 | |
65 # list all option lists | |
66 def opttext(optlist, width, verbose): | |
67 rst = '' | |
68 if not optlist: | |
69 return '' | |
70 | |
71 for title, options in optlist: | |
72 rst += '\n%s\n' % title | |
73 if options: | |
74 rst += "\n" | |
75 rst += optrst(options, verbose) | |
76 rst += '\n' | |
77 | |
78 return '\n' + minirst.format(rst, width) | |
79 | 64 |
80 def topicmatch(kw): | 65 def topicmatch(kw): |
81 """Return help topics matching kw. | 66 """Return help topics matching kw. |
82 | 67 |
83 Returns {'section': [(name, summary), ...], ...} where section is | 68 Returns {'section': [(name, summary), ...], ...} where section is |