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

  • Committer: Ian Clatworthy
  • Date: 2009-03-16 22:22:06 UTC
  • mfrom: (4145.2.1 bzr.faster-check)
  • mto: This revision was merged to the branch mainline in revision 4151.
  • Revision ID: ian.clatworthy@canonical.com-20090316222206-xgiuko42s5bui64z
faster check (Ian Clatworthy)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1380
1380
    def find_text_key_references(self):
1381
1381
        """Find the text key references within the repository.
1382
1382
 
1383
 
        :return: a dictionary mapping (file_id, revision_id) tuples to altered file-ids to an iterable of
1384
 
        revision_ids. Each altered file-ids has the exact revision_ids that
1385
 
        altered it listed explicitly.
1386
1383
        :return: A dictionary mapping text keys ((fileid, revision_id) tuples)
1387
1384
            to whether they were referred to by the inventory of the
1388
1385
            revision_id that they contain. The inventory texts from all present
1996
1993
                [parents_provider, other_repository._make_parents_provider()])
1997
1994
        return graph.Graph(parents_provider)
1998
1995
 
1999
 
    def _get_versioned_file_checker(self):
2000
 
        """Return an object suitable for checking versioned files."""
2001
 
        return _VersionedFileChecker(self)
 
1996
    def _get_versioned_file_checker(self, text_key_references=None):
 
1997
        """Return an object suitable for checking versioned files.
 
1998
        
 
1999
        :param text_key_references: if non-None, an already built
 
2000
            dictionary mapping text keys ((fileid, revision_id) tuples)
 
2001
            to whether they were referred to by the inventory of the
 
2002
            revision_id that they contain. If None, this will be
 
2003
            calculated.
 
2004
        """
 
2005
        return _VersionedFileChecker(self,
 
2006
            text_key_references=text_key_references)
2002
2007
 
2003
2008
    def revision_ids_to_search_result(self, result_set):
2004
2009
        """Convert a set of revision ids to a graph SearchResult."""
3502
3507
 
3503
3508
class _VersionedFileChecker(object):
3504
3509
 
3505
 
    def __init__(self, repository):
 
3510
    def __init__(self, repository, text_key_references=None):
3506
3511
        self.repository = repository
3507
 
        self.text_index = self.repository._generate_text_key_index()
 
3512
        self.text_index = self.repository._generate_text_key_index(
 
3513
            text_key_references=text_key_references)
3508
3514
 
3509
3515
    def calculate_file_version_parents(self, text_key):
3510
3516
        """Calculate the correct parents for a file version according to