/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/help.py

  • Committer: Martin
  • Date: 2018-11-16 19:09:31 UTC
  • mfrom: (7175 work)
  • mto: This revision was merged to the branch mainline in revision 7177.
  • Revision ID: gzlist@googlemail.com-20181116190931-rmh7pk2an1zuecby
Merge trunk to resolve conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
class NoHelpTopic(errors.BzrError):
38
38
 
39
39
    _fmt = ("No help could be found for '%(topic)s'. "
40
 
        "Please use 'brz help topics' to obtain a list of topics.")
 
40
            "Please use 'brz help topics' to obtain a list of topics.")
41
41
 
42
42
    def __init__(self, topic):
43
43
        self.topic = topic
56
56
        shadowed_terms = []
57
57
        for index, topic_obj in topics[1:]:
58
58
            shadowed_terms.append('%s%s' % (index.prefix,
59
 
                topic_obj.get_help_topic()))
 
59
                                            topic_obj.get_help_topic()))
60
60
        source = topics[0][1]
61
61
        outfile.write(source.get_help_text(shadowed_terms))
62
62
    except NoHelpTopic:
65
65
 
66
66
    if alias is not None:
67
67
        outfile.write("'brz %s' is an alias for 'brz %s'.\n" % (topic,
68
 
            " ".join(alias)))
 
68
                                                                " ".join(alias)))
69
69
 
70
70
 
71
71
def help_commands(outfile=None):
167
167
        self._check_prefix_uniqueness()
168
168
        result = []
169
169
        for index in self.search_path:
170
 
            result.extend([(index, _topic) for _topic in index.get_topics(topic)])
 
170
            result.extend([(index, _topic)
 
171
                           for _topic in index.get_topics(topic)])
171
172
        if not result:
172
173
            raise NoHelpTopic(topic)
173
174
        else: