~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/help.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-08-17 18:13:57 UTC
  • mfrom: (5268.7.29 transport-segments)
  • Revision ID: pqm@pqm.ubuntu.com-20110817181357-y5q5eth1hk8bl3om
(jelmer) Allow specifying the colocated branch to use in the branch URL,
 and retrieving the branch name using ControlDir._get_selected_branch.
 (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
from __future__ import absolute_import
18
 
 
19
17
# TODO: Some way to get a list of external commands (defined by shell
20
18
# scripts) so that they can be included in the help listing as well.
21
19
# It should be enough to just list the plugin directory and look for
31
29
    help_topics,
32
30
    osutils,
33
31
    plugin,
34
 
    ui,
35
32
    utextwrap,
36
33
    )
37
34
 
39
36
def help(topic=None, outfile=None):
40
37
    """Write the help for the specific topic to outfile"""
41
38
    if outfile is None:
42
 
        outfile = ui.ui_factory.make_output_stream()
 
39
        outfile = sys.stdout
43
40
 
44
41
    indices = HelpIndices()
45
42
 
64
61
def help_commands(outfile=None):
65
62
    """List all commands"""
66
63
    if outfile is None:
67
 
        outfile = ui.ui_factory.make_output_stream()
 
64
        outfile = sys.stdout
68
65
    outfile.write(_help_commands_to_text('commands'))
69
66
 
70
67