Show More
@@ -3218,9 +3218,9 b' def help_(ui, name=None, unknowncmd=Fals' | |||
|
3218 | 3218 | hangindent=' ' * (m + 4)))) |
|
3219 | 3219 | |
|
3220 | 3220 | if not name: |
|
3221 |
|
|
|
3222 |
if |
|
|
3223 |
ui.write("\n%s" % minirst.format( |
|
|
3221 | rst = help.listexts(_('enabled extensions:'), extensions.enabled()) | |
|
3222 | if rst: | |
|
3223 | ui.write("\n%s" % minirst.format('\n'.join(rst), textwidth)) | |
|
3224 | 3224 | |
|
3225 | 3225 | ui.write(_("\nadditional help topics:\n\n")) |
|
3226 | 3226 | topics = [] |
@@ -3318,12 +3318,12 b' def help_(ui, name=None, unknowncmd=Fals' | |||
|
3318 | 3318 | ui.configbool('ui', 'strict')) |
|
3319 | 3319 | doc = gettext(mod.__doc__).splitlines()[0] |
|
3320 | 3320 | |
|
3321 |
|
|
|
3321 | rst = help.listexts(_("'%s' is provided by the following " | |
|
3322 | 3322 | "extension:") % cmd, {ext: doc}, indent=4) |
|
3323 | ui.write(minirst.format(msg, textwidth)) | |
|
3324 | ui.write('\n') | |
|
3325 | ui.write(_('use "hg help extensions" for information on enabling ' | |
|
3323 | rst.append('\n') | |
|
3324 | rst.append(_('use "hg help extensions" for information on enabling ' | |
|
3326 | 3325 | 'extensions\n')) |
|
3326 | ui.write(minirst.format(''.join(rst), textwidth)) | |
|
3327 | 3327 | |
|
3328 | 3328 | kw = opts.get('keyword') |
|
3329 | 3329 | if kw: |
@@ -12,19 +12,18 b' import encoding, util, minirst' | |||
|
12 | 12 | |
|
13 | 13 | def listexts(header, exts, indent=1): |
|
14 | 14 | '''return a text listing of the given extensions''' |
|
15 | if not exts: | |
|
16 | return '' | |
|
17 | maxlength = max(len(e) for e in exts) | |
|
18 | result = '\n%s\n\n' % header | |
|
19 | for name, desc in sorted(exts.iteritems()): | |
|
20 | result += '%s%-*s %s\n' % (' ' * indent, maxlength + 2, | |
|
21 | ':%s:' % name, desc) | |
|
22 | return result | |
|
15 | rst = [] | |
|
16 | if exts: | |
|
17 | rst.append('\n%s\n\n' % header) | |
|
18 | for name, desc in sorted(exts.iteritems()): | |
|
19 | rst.append('%s:%s: %s\n' % (' ' * indent, name, desc)) | |
|
20 | return rst | |
|
23 | 21 | |
|
24 | 22 | def extshelp(): |
|
25 |
|
|
|
26 |
|
|
|
27 |
|
|
|
23 | rst = loaddoc('extensions')().splitlines(True) | |
|
24 | rst.extend(listexts(_('enabled extensions:'), extensions.enabled())) | |
|
25 | rst.extend(listexts(_('disabled extensions:'), extensions.disabled())) | |
|
26 | doc = ''.join(rst) | |
|
28 | 27 | return doc |
|
29 | 28 | |
|
30 | 29 | def optrst(options, verbose): |
General Comments 0
You need to be logged in to leave comments.
Login now