~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/registry.py

  • Committer: Martin Pool
  • Date: 2007-01-24 07:12:09 UTC
  • mto: This revision was merged to the branch mainline in revision 2244.
  • Revision ID: mbp@sourcefrog.net-20070124071209-yqiths20n6wxqaqr
Change RepositoryFormat to use a Registry rather than ad-hoc dictionary

Show diffs side-by-side

added added

removed removed

Lines of Context:
200
200
        for key, getter in self._dict.iteritems():
201
201
            yield key, getter.get_obj()
202
202
 
 
203
    def itervalues(self):
 
204
        """Iterate all registry values in key order.
 
205
 
 
206
        This imports any lazily registered entries.
 
207
        """
 
208
        for key in self.keys():
 
209
            yield self.get(key)
 
210
 
203
211
    def _set_default_key(self, key):
204
212
        if not self._dict.has_key(key):
205
213
            raise KeyError('No object registered under key %s.' % key)