/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 bzrlib/commands.py

  • Committer: Martin Albisetti
  • Date: 2008-04-04 01:04:57 UTC
  • mto: (3350.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 3351.
  • Revision ID: argentina@gmail.com-20080404010457-aifcu04lowab77qq
Code cleanup and documentation

Show diffs side-by-side

added added

removed removed

Lines of Context:
177
177
        except errors.NoPluginAvailable:
178
178
            pass
179
179
        else:
180
 
            raise errors.CommandAvailableInPlugin(cmd_name, plugin_metadata, provider)
 
180
            raise errors.CommandAvailableInPlugin(cmd_name, 
 
181
                                                plugin_metadata, provider)
181
182
 
182
183
    raise KeyError
183
184
 
895
896
 
896
897
 
897
898
class Provider(object):
 
899
    '''Generic class to be overriden by plugins'''
898
900
 
899
901
    def plugin_for_command(self, cmd_name):
 
902
        '''Takes a command and returns the information for that plugin
 
903
        
 
904
        :return: A dictionary with all the available information 
 
905
        for the requested plugin
 
906
        '''
900
907
        raise NotImplementedError
901
908
 
902
909
 
903
910
class ProvidersRegistry(registry.Registry):
904
911
    '''This registry exists to allow other providers to exist'''
 
912
 
905
913
    def __iter__(self):
906
914
        for key, provider in self.iteritems():
907
915
            yield provider
908
 
    pass
909
916
 
910
917
command_providers_registry = ProvidersRegistry()
911
918