/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: Jelmer Vernooij
  • Date: 2017-06-10 00:06:46 UTC
  • mfrom: (6673 work)
  • mto: This revision was merged to the branch mainline in revision 6675.
  • Revision ID: jelmer@jelmer.uk-20170610000646-xj6jh277lo4xuo10
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
 
144
144
    def _check_prefix_uniqueness(self):
145
145
        """Ensure that the index collection is able to differentiate safely."""
146
 
        prefixes = {}
 
146
        prefixes = set()
147
147
        for index in self.search_path:
148
 
            prefixes.setdefault(index.prefix, []).append(index)
149
 
        for prefix, indices in prefixes.items():
150
 
            if len(indices) > 1:
 
148
            prefix = index.prefix
 
149
            if prefix in prefixes:
151
150
                raise errors.DuplicateHelpPrefix(prefix)
 
151
            prefixes.add(prefix)
152
152
 
153
153
    def search(self, topic):
154
154
        """Search for topic across the help search path.