~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/vf_repository.py

  • Committer: Jelmer Vernooij
  • Date: 2011-07-23 11:16:56 UTC
  • mto: This revision was merged to the branch mainline in revision 6044.
  • Revision ID: jelmer@samba.org-20110723111656-xi14q3a4forj4ixd
Move Repository._eliminate_revisions_not_present to VFRepository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1180
1180
                'sha1 mismatch: %s has sha1 %s expected %s referenced by %s' %
1181
1181
                (record.key, sha1, item_data[1], item_data[2]))
1182
1182
 
 
1183
    @needs_read_lock
 
1184
    def _eliminate_revisions_not_present(self, revision_ids):
 
1185
        """Check every revision id in revision_ids to see if we have it.
 
1186
 
 
1187
        Returns a set of the present revisions.
 
1188
        """
 
1189
        result = []
 
1190
        graph = self.get_graph()
 
1191
        parent_map = graph.get_parent_map(revision_ids)
 
1192
        # The old API returned a list, should this actually be a set?
 
1193
        return parent_map.keys()
 
1194
 
1183
1195
    def __init__(self, _format, a_bzrdir, control_files):
1184
1196
        """Instantiate a VersionedFileRepository.
1185
1197