~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/pack_repo.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-01-11 08:32:51 UTC
  • mfrom: (3172.3.3 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20080111083251-et161scbblpkphri
(robertc) Add Repository.has_revisions as part of improving pull.
        (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1926
1926
            found_parents[key[0]] = parents
1927
1927
        return found_parents
1928
1928
 
 
1929
    def has_revisions(self, revision_ids):
 
1930
        """See Repository.has_revisions()."""
 
1931
        revision_ids = set(revision_ids)
 
1932
        result = revision_ids.intersection(
 
1933
            set([None, _mod_revision.NULL_REVISION]))
 
1934
        revision_ids.difference_update(result)
 
1935
        index = self._pack_collection.revision_index.combined_index
 
1936
        keys = [(revision_id,) for revision_id in revision_ids]
 
1937
        result.update(node[1][0] for node in index.iter_entries(keys))
 
1938
        return result
 
1939
 
1929
1940
    def _make_parents_provider(self):
1930
1941
        return graph.CachingParentsProvider(self)
1931
1942