Show More
@@ -31,7 +31,7 b' def extshelp():' | |||||
31 | doc = ''.join(rst) |
|
31 | doc = ''.join(rst) | |
32 | return doc |
|
32 | return doc | |
33 |
|
33 | |||
34 | def optrst(options, verbose): |
|
34 | def optrst(header, options, verbose): | |
35 | data = [] |
|
35 | data = [] | |
36 | multioccur = False |
|
36 | multioccur = False | |
37 | for option in options: |
|
37 | for option in options: | |
@@ -59,7 +59,8 b' def optrst(options, verbose):' | |||||
59 |
|
59 | |||
60 | data.append((so, lo, desc)) |
|
60 | data.append((so, lo, desc)) | |
61 |
|
61 | |||
62 | rst = minirst.maketable(data, 1) |
|
62 | rst = ['\n%s:\n\n' % header] | |
|
63 | rst.extend(minirst.maketable(data, 1)) | |||
63 |
|
64 | |||
64 | if multioccur: |
|
65 | if multioccur: | |
65 | rst.append(_("\n[+] marked option can be specified multiple times\n")) |
|
66 | rst.append(_("\n[+] marked option can be specified multiple times\n")) | |
@@ -284,12 +285,11 b' def help_(ui, name, unknowncmd=False, fu' | |||||
284 |
|
285 | |||
285 | # options |
|
286 | # options | |
286 | if not ui.quiet and entry[1]: |
|
287 | if not ui.quiet and entry[1]: | |
287 |
rst.append( |
|
288 | rst.append(optrst(_("options"), entry[1], ui.verbose)) | |
288 | rst.append(optrst(entry[1], ui.verbose)) |
|
|||
289 |
|
289 | |||
290 | if ui.verbose: |
|
290 | if ui.verbose: | |
291 |
rst.append( |
|
291 | rst.append(optrst(_("global options"), | |
292 |
|
|
292 | commands.globalopts, ui.verbose)) | |
293 |
|
293 | |||
294 | if not ui.verbose: |
|
294 | if not ui.verbose: | |
295 | if not full: |
|
295 | if not full: | |
@@ -366,8 +366,8 b' def help_(ui, name, unknowncmd=False, fu' | |||||
366 | if ui.quiet: |
|
366 | if ui.quiet: | |
367 | pass |
|
367 | pass | |
368 | elif ui.verbose: |
|
368 | elif ui.verbose: | |
369 |
rst.append(_(" |
|
369 | rst.append('\n%s\n' % optrst(_("global options"), | |
370 |
|
|
370 | commands.globalopts, ui.verbose)) | |
371 | if name == 'shortlist': |
|
371 | if name == 'shortlist': | |
372 | rst.append(_('\nuse "hg help" for the full list ' |
|
372 | rst.append(_('\nuse "hg help" for the full list ' | |
373 | 'of commands\n')) |
|
373 | 'of commands\n')) |
General Comments 0
You need to be logged in to leave comments.
Login now