~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: 2010-04-06 06:59:03 UTC
  • mfrom: (5051.5.1 subunit)
  • Revision ID: pqm@pqm.ubuntu.com-20100406065903-y9dxgwmog1pmw7dz
Use subunit when running tests in PQM.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
# TODO: `help commands --all` should show hidden commands
23
23
 
24
24
import sys
 
25
import textwrap
25
26
 
26
27
from bzrlib import (
27
28
    commands as _mod_commands,
29
30
    help_topics,
30
31
    osutils,
31
32
    plugin,
32
 
    utextwrap,
 
33
    symbol_versioning,
33
34
    )
34
35
 
35
36
 
44
45
    try:
45
46
        topics = indices.search(topic)
46
47
        shadowed_terms = []
47
 
        for index, topic_obj in topics[1:]:
 
48
        for index, topic in topics[1:]:
48
49
            shadowed_terms.append('%s%s' % (index.prefix,
49
 
                topic_obj.get_help_topic()))
 
50
                topic.get_help_topic()))
50
51
        source = topics[0][1]
51
52
        outfile.write(source.get_help_text(shadowed_terms))
52
53
    except errors.NoHelpTopic:
96
97
        else:
97
98
            firstline = ''
98
99
        helpstring = '%-*s %s%s' % (max_name, cmd_name, firstline, plugin_name)
99
 
        lines = utextwrap.wrap(
 
100
        lines = textwrap.wrap(
100
101
            helpstring, subsequent_indent=indent,
101
102
            width=width,
102
103
            break_long_words=False)