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
1=== modified file 'bzrlib/doc_generate/autodoc_man.py'
2--- bzrlib/doc_generate/autodoc_man.py 2012-03-14 16:58:27 +0000
3+++ bzrlib/doc_generate/autodoc_man.py 2012-03-15 15:12:21 +0000
4@@ -23,6 +23,8 @@
5
6 from __future__ import absolute_import
7
8+PLUGINS_TO_DOCUMENT = ["launchpad"]
9+
10 import textwrap
11 import time
12
13@@ -31,6 +33,9 @@
14 import bzrlib.help_topics
15 import bzrlib.commands
16
17+from bzrlib.plugin import load_plugins
18+load_plugins()
19+
20
21 def get_filename(options):
22 """Provides name of manpage"""
23@@ -66,6 +71,11 @@
24 def command_name_list():
25 """Builds a list of command names from bzrlib"""
26 command_names = bzrlib.commands.builtin_command_names()
27+ for cmdname in bzrlib.commands.plugin_command_names():
28+ cmd_object = bzrlib.commands.get_cmd_object(cmdname)
29+ if (PLUGINS_TO_DOCUMENT is None or
30+ cmd_object.plugin_name() in PLUGINS_TO_DOCUMENT):
31+ command_names.append(cmdname)
32 command_names.sort()
33 return command_names
34
35@@ -105,7 +115,7 @@
36 return output
37
38
39-def format_command (params, cmd):
40+def format_command(params, cmd):
41 """Provides long help for each public command"""
42 subsection_header = '.SS "%s"\n' % (cmd._usage())
43 doc = "%s\n" % (cmd.__doc__)
44@@ -134,7 +144,7 @@
45 subsequent_indent=30*' ',
46 break_long_words=False,
47 )
48- option_str = option_str + wrapped + '\n'
49+ option_str += wrapped + '\n'
50
51 aliases_str = ""
52 if cmd.aliases:
53
54=== modified file 'doc/en/release-notes/bzr-2.6.txt'
55--- doc/en/release-notes/bzr-2.6.txt 2012-03-15 11:09:54 +0000
56+++ doc/en/release-notes/bzr-2.6.txt 2012-03-15 15:12:21 +0000
57@@ -117,6 +117,12 @@
58 Documentation
59 *************
60
61+.. Improved or updated documentation.
62+
63+* Document "bzr lp-propose", "bzr register-branch" and
64+ the other Launchpad plugin commands in bzr(1).
65+ (Jelmer Vernooij, #843801, #163995)
66+
67 * Prevent lines of command descriptions starting with a dot to
68 accidentally be interpreted as a roff macro in bzr(1).
69 (Jelmer Vernooij, #711079)