Show More
@@ -673,16 +673,6 b' def formattedhelp(ui, commands, name, ke' | |||
|
673 | 673 | subtopic=subtopic, unknowncmd=unknowncmd, full=full, **opts) |
|
674 | 674 | |
|
675 | 675 | blocks, pruned = minirst.parse(text, keep=keep) |
|
676 | if section: | |
|
677 | blocks = minirst.filtersections(blocks, section) | |
|
678 | formatted = minirst.formatplain(blocks, textwidth) | |
|
679 | ||
|
680 | # We could have been given a weird ".foo" section without a name | |
|
681 | # to look for, or we could have simply failed to found "foo.bar" | |
|
682 | # because bar isn't a section of foo | |
|
683 | if section and not (formatted and name): | |
|
684 | raise error.Abort(_("help section not found: %s") % fullname) | |
|
685 | ||
|
686 | 676 | if 'verbose' in pruned: |
|
687 | 677 | keep.append('omitted') |
|
688 | 678 | else: |
@@ -690,4 +680,11 b' def formattedhelp(ui, commands, name, ke' | |||
|
690 | 680 | blocks, pruned = minirst.parse(text, keep=keep) |
|
691 | 681 | if section: |
|
692 | 682 | blocks = minirst.filtersections(blocks, section) |
|
683 | ||
|
684 | # We could have been given a weird ".foo" section without a name | |
|
685 | # to look for, or we could have simply failed to found "foo.bar" | |
|
686 | # because bar isn't a section of foo | |
|
687 | if section and not (blocks and name): | |
|
688 | raise error.Abort(_("help section not found: %s") % fullname) | |
|
689 | ||
|
693 | 690 | return minirst.formatplain(blocks, textwidth) |
General Comments 0
You need to be logged in to leave comments.
Login now