Merge lp:~jelmer/bzr/bzr.1-launchpad-commands into lp:bzr

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Vincent Ladeuil
Approved revision: no longer in the source branch.
Merged at revision: 6507
Proposed branch: lp:~jelmer/bzr/bzr.1-launchpad-commands
Merge into: lp:bzr
Diff against target: 69 lines (+18/-2)
2 files modified
bzrlib/doc_generate/autodoc_man.py (+12/-2)
doc/en/release-notes/bzr-2.6.txt (+6/-0)
To merge this branch: bzr merge lp:~jelmer/bzr/bzr.1-launchpad-commands
Reviewer Review Type Date Requested Status
Martin Pool Approve
Review via email: mp+97443@code.launchpad.net

Commit message

Document launchpad commands in bzr(1) manpage.

Description of the change

Document the various launchpad plugins in bzr(1).

This seemed like a reasonable way to do this. Better suggestions welcome. :-)

To post a comment you must log in.
Revision history for this message
Martin Pool (mbp) wrote :

wfm. Another option would be to generate a bzr-launchpad manpage,
which would scale better for other plugins. But for now this is fine.

  vote approve

review: Approve
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

sent to pqm by email

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bzrlib/doc_generate/autodoc_man.py'
--- bzrlib/doc_generate/autodoc_man.py 2012-03-14 16:58:27 +0000
+++ bzrlib/doc_generate/autodoc_man.py 2012-03-15 15:12:21 +0000
@@ -23,6 +23,8 @@
2323
24from __future__ import absolute_import24from __future__ import absolute_import
2525
26PLUGINS_TO_DOCUMENT = ["launchpad"]
27
26import textwrap28import textwrap
27import time29import time
2830
@@ -31,6 +33,9 @@
31import bzrlib.help_topics33import bzrlib.help_topics
32import bzrlib.commands34import bzrlib.commands
3335
36from bzrlib.plugin import load_plugins
37load_plugins()
38
3439
35def get_filename(options):40def get_filename(options):
36 """Provides name of manpage"""41 """Provides name of manpage"""
@@ -66,6 +71,11 @@
66def command_name_list():71def command_name_list():
67 """Builds a list of command names from bzrlib"""72 """Builds a list of command names from bzrlib"""
68 command_names = bzrlib.commands.builtin_command_names()73 command_names = bzrlib.commands.builtin_command_names()
74 for cmdname in bzrlib.commands.plugin_command_names():
75 cmd_object = bzrlib.commands.get_cmd_object(cmdname)
76 if (PLUGINS_TO_DOCUMENT is None or
77 cmd_object.plugin_name() in PLUGINS_TO_DOCUMENT):
78 command_names.append(cmdname)
69 command_names.sort()79 command_names.sort()
70 return command_names80 return command_names
7181
@@ -105,7 +115,7 @@
105 return output115 return output
106116
107117
108def format_command (params, cmd):118def format_command(params, cmd):
109 """Provides long help for each public command"""119 """Provides long help for each public command"""
110 subsection_header = '.SS "%s"\n' % (cmd._usage())120 subsection_header = '.SS "%s"\n' % (cmd._usage())
111 doc = "%s\n" % (cmd.__doc__)121 doc = "%s\n" % (cmd.__doc__)
@@ -134,7 +144,7 @@
134 subsequent_indent=30*' ',144 subsequent_indent=30*' ',
135 break_long_words=False,145 break_long_words=False,
136 )146 )
137 option_str = option_str + wrapped + '\n' 147 option_str += wrapped + '\n'
138148
139 aliases_str = ""149 aliases_str = ""
140 if cmd.aliases:150 if cmd.aliases:
141151
=== modified file 'doc/en/release-notes/bzr-2.6.txt'
--- doc/en/release-notes/bzr-2.6.txt 2012-03-15 11:09:54 +0000
+++ doc/en/release-notes/bzr-2.6.txt 2012-03-15 15:12:21 +0000
@@ -117,6 +117,12 @@
117Documentation117Documentation
118*************118*************
119119
120.. Improved or updated documentation.
121
122* Document "bzr lp-propose", "bzr register-branch" and
123 the other Launchpad plugin commands in bzr(1).
124 (Jelmer Vernooij, #843801, #163995)
125
120* Prevent lines of command descriptions starting with a dot to126* Prevent lines of command descriptions starting with a dot to
121 accidentally be interpreted as a roff macro in bzr(1).127 accidentally be interpreted as a roff macro in bzr(1).
122 (Jelmer Vernooij, #711079)128 (Jelmer Vernooij, #711079)