~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/btree_index.py

  • Committer: Andrew Bennetts
  • Date: 2008-11-27 06:37:34 UTC
  • mfrom: (3861 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3864.
  • Revision ID: andrew.bennetts@canonical.com-20081127063734-8bdgt0ugf7kqw82a
Merge bzr.dev, fixing NEWS conflict.

Show diffs side-by-side

added added

removed removed

Lines of Context:
431
431
            efficient order for the index (keys iteration order in this case).
432
432
        """
433
433
        keys = set(keys)
 
434
        local_keys = keys.intersection(self._keys)
434
435
        if self.reference_lists:
435
 
            for key in keys.intersection(self._keys):
 
436
            for key in local_keys:
436
437
                node = self._nodes[key]
437
438
                yield self, key, node[1], node[0]
438
439
        else:
439
 
            for key in keys.intersection(self._keys):
 
440
            for key in local_keys:
440
441
                node = self._nodes[key]
441
442
                yield self, key, node[1]
442
 
        keys.difference_update(self._keys)
 
443
        # Find things that are in backing indices that have not been handled
 
444
        # yet.
 
445
        if not self._backing_indices:
 
446
            return # We won't find anything there either
 
447
        # Remove all of the keys that we found locally
 
448
        keys.difference_update(local_keys)
443
449
        for backing in self._backing_indices:
444
450
            if backing is None:
445
451
                continue