~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/help_topics.py

  • Committer: ghigo
  • Date: 2007-02-07 21:08:04 UTC
  • mto: (1739.1.7 integration)
  • mto: This revision was merged to the branch mainline in revision 2443.
  • Revision ID: ghigo@venice-20070207210804-r551d0lozrp20uex
On the basis of Robert Collins and John Arbash Meinel
- removed some protocol ( http[s]+pycurl:// and http[s]+urllib://, 
bzr+http:// and readonly+ )
- _help_on_trasport( ) now supports the missing of the modifiers
- add a blackbox test case
- little PEP8 cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
 
100
100
    return ''.join(out)
101
101
 
 
102
 
102
103
def _help_on_transport(name):
103
104
    from bzrlib.transport import (
104
105
        transport_list_registry,
124
125
    out = []
125
126
    protl = []
126
127
    decl = []
127
 
    protl.append("\nSupported URL prefix\n--------------------\n")
128
 
    decl.append("\nSupported modifiers\n-------------------\n")
129
128
    protos = transport_list_registry.keys( )
130
129
    protos.sort(sort_func)
131
130
    for proto in protos:
138
137
            decl.extend(add_string(proto, shorthelp, 79))
139
138
 
140
139
 
141
 
    out = ''.join(protl+decl)
 
140
    out = "\nSupported URL prefix\n--------------------\n" + \
 
141
            ''.join(protl)
 
142
 
 
143
    if len(decl):
 
144
        out += "\nSupported modifiers\n-------------------\n" + \
 
145
            ''.join(decl)
142
146
 
143
147
    return out
144
148