~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/index.py

  • Committer: Robert Collins
  • Date: 2007-07-13 11:20:45 UTC
  • mto: (2592.5.3 pack-repository)
  • mto: This revision was merged to the branch mainline in revision 2624.
  • Revision ID: robertc@robertcollins.net-20070713112045-o30wjumnx9ueyoz4
Basic iter_entries working.

Show diffs side-by-side

added added

removed removed

Lines of Context:
241
241
            defined order for the result iteration - it will be in the most
242
242
            efficient order for the index.
243
243
        """
244
 
        if not keys:
245
 
            return
246
 
        if False:
247
 
            yield None
248
 
        raise errors.MissingKey(self, keys[0])
 
244
        found = set()
 
245
        keys = set(keys)
 
246
        for node in self.iter_all_entries():
 
247
            if node[0] in keys:
 
248
                yield node
 
249
                found.add(node[0])
 
250
        missing = keys.difference(found)
 
251
        if missing:
 
252
            raise errors.MissingKey(self, missing.pop())
249
253
 
250
254
    def _signature(self):
251
255
        """The file signature for this index type."""