~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/index.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-08-17 18:18:18 UTC
  • mfrom: (4618.2.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090817181818-6ks7pxgiwpqvsd3l
(vila) Make selftest --parallel=fork work again

Show diffs side-by-side

added added

removed removed

Lines of Context:
333
333
        if combine_backing_indices is not None:
334
334
            self._combine_backing_indices = combine_backing_indices
335
335
 
336
 
    def find_ancestry(self, keys, ref_list_num):
337
 
        """See CombinedGraphIndex.find_ancestry()"""
338
 
        pending = set(keys)
339
 
        parent_map = {}
340
 
        missing_keys = set()
341
 
        while pending:
342
 
            next_pending = set()
343
 
            for _, key, value, ref_lists in self.iter_entries(pending):
344
 
                parent_keys = ref_lists[ref_list_num]
345
 
                parent_map[key] = parent_keys
346
 
                next_pending.update([p for p in parent_keys if p not in
347
 
                                     parent_map])
348
 
                missing_keys.update(pending.difference(parent_map))
349
 
            pending = next_pending
350
 
        return parent_map, missing_keys
351
 
 
352
336
 
353
337
class GraphIndex(object):
354
338
    """An index for data with embedded graphs.