Merge lp://staging/~spiv/bzr/html-cmd-help into lp://staging/bzr
Status: | Work in progress |
---|---|
Proposed branch: | lp://staging/~spiv/bzr/html-cmd-help |
Merge into: | lp://staging/bzr |
Diff against target: |
117 lines (+51/-14) 5 files modified
NEWS (+3/-0) bzrlib/commands.py (+6/-14) bzrlib/option.py (+32/-0) doc/en/_static/bzr-docs.css (+5/-0) doc/en/_templates/layout.html (+5/-0) |
To merge this branch: | bzr merge lp://staging/~spiv/bzr/html-cmd-help |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Pool | Approve | ||
Review via email: mp+36244@code.staging.launchpad.net |
Commit message
Fix rendering of HTML of command-line options such as "--1.14".
Description of the change
I noticed that the HTML rendering of command help was once again failing due to options with dots in them, like "--1.14". Neither plain ReST nor Sphinx's option markup allows for dots in option names. Previously we were doing a rather fragile hack by looking for a fixed string in the output, and if so doing a crude string munging to make all branch format options get rendered as preformatted text.
This change instead subclasses optparse's IndentedHelpFor
Hopefully this will prove less fragile, although I'm not sure if that will work out to be true in practice.
Perhaps instead we should fix bug 330494, to remove those option names? It seems a bit perverse to change our UI to match an oversight in our documentation tools, though.
Unmerged revisions
- 5440. By Andrew Bennetts
-
Do not use SphinxHelpFormatter if get_help_text was asked for plain output.
- 5439. By Andrew Bennetts
-
Add NEWS entry.
- 5438. By Andrew Bennetts
-
Tweak the HTML to approximately match Sphinx's default rendering of command-line options.
- 5437. By Andrew Bennetts
-
Replace crude munging of optparse's indented help output -> ReST with slightly less crude subclassing of IndentedHelpFor
matter.
sent to pqm by email