/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-10-19 15:39:25 UTC
  • mto: This revision was merged to the branch mainline in revision 4758.
  • Revision ID: john@arbash-meinel.com-20091019153925-pkvnaoho6a2aawj7
Start exposing an GraphIndex.clear_cache() member.
This is exposed on GraphIndex, CombinedGraphIndex and BTreeGraphIndex.

Show diffs side-by-side

added added

removed removed

Lines of Context:
461
461
            # there must be one line - the empty trailer line.
462
462
            raise errors.BadIndexData(self)
463
463
 
 
464
    def clear_cache(self):
 
465
        """Clear out any cached/memoized values.
 
466
 
 
467
        This can be called at any time, but generally it is used when we have
 
468
        extracted some information, but don't expect to be requesting any more
 
469
        from this index.
 
470
        """
 
471
 
464
472
    def external_references(self, ref_list_num):
465
473
        """Return references that are not present in this index.
466
474
        """
1226
1234
                self.__class__.__name__,
1227
1235
                ', '.join(map(repr, self._indices)))
1228
1236
 
 
1237
    def clear_cache(self):
 
1238
        """See GraphIndex.clear_cache()"""
 
1239
        for index in self._indices:
 
1240
            index.clear_cache()
 
1241
 
1229
1242
    def get_parent_map(self, keys):
1230
1243
        """See graph.StackedParentsProvider.get_parent_map"""
1231
1244
        search_keys = set(keys)