/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/index.py

  • Committer: John Arbash Meinel
  • Date: 2009-08-13 19:56:26 UTC
  • mto: This revision was merged to the branch mainline in revision 4613.
  • Revision ID: john@arbash-meinel.com-20090813195626-tlsu5cexc1q8lzmr
Name the specific index api _find_ancestors, and the public CombinedGraphIndex api find_ancestry()

Show diffs side-by-side

added added

removed removed

Lines of Context:
702
702
                # the last thing looked up was a terminal element
703
703
                yield (self, ) + key_dict
704
704
 
705
 
    def get_local_parent_map(self, keys, ref_list_num, parent_map,
706
 
                             missing_keys):
707
 
        """See BTreeIndex.get_local_parent_map."""
 
705
    def _find_ancestors(self, keys, ref_list_num, parent_map, missing_keys):
 
706
        """See BTreeIndex._find_ancestors."""
708
707
        # The api can be implemented as a trivial overlay on top of
709
708
        # iter_entries, it is not an efficient implementation, but it at least
710
709
        # gets the job done.
1315
1314
            except errors.NoSuchFile:
1316
1315
                self._reload_or_raise()
1317
1316
 
1318
 
    def get_ancestry(self, keys):
 
1317
    def find_ancestry(self, keys, ref_list_num):
1319
1318
        """Find the complete ancestry for the given set of keys.
1320
1319
 
 
1320
        Note that this is a whole-ancestry request, so it should be used
 
1321
        sparingly.
 
1322
 
1321
1323
        :param keys: An iterable of keys to look for
 
1324
        :param ref_list_num: The reference list which references the parents
 
1325
            we care about.
1322
1326
        :return: (parent_map, missing_keys)
1323
1327
        """
1324
1328
        missing_keys = set()
1351
1355
                    # TODO: ref_list_num should really be a parameter, since
1352
1356
                    #       CombinedGraphIndex does not know what the ref lists
1353
1357
                    #       mean.
1354
 
                    search_keys = index.get_ancestry(search_keys, 0,
1355
 
                        parent_map, index_missing_keys)
 
1358
                    search_keys = index._find_ancestors(search_keys,
 
1359
                        ref_list_num, parent_map, index_missing_keys)
1356
1360
                    # print '    \t  \t%2d\t%4d\t%5d\t%5d' % (
1357
1361
                    #     sub_generation, len(search_keys),
1358
1362
                    #     len(parent_map), len(index_missing_keys))