/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

(mbp) prepare 1.4rc2 release

Show diffs side-by-side

added added

removed removed

Lines of Context:
592
592
        Returns a set of the present revisions.
593
593
        """
594
594
        result = []
595
 
        for id in revision_ids:
596
 
            if self.has_revision(id):
597
 
               result.append(id)
598
 
        return result
 
595
        graph = self.get_graph()
 
596
        parent_map = graph.get_parent_map(revision_ids)
 
597
        # The old API returned a list, should this actually be a set?
 
598
        return parent_map.keys()
599
599
 
600
600
    @staticmethod
601
601
    def create(a_bzrdir):
1278
1278
                setdefault(file_id, set()).add(revision_id)
1279
1279
        return result
1280
1280
 
1281
 
    def fileids_altered_by_revision_ids(self, revision_ids, _inv_weave=None):
 
1281
    def fileids_altered_by_revision_ids(self, revision_ids):
1282
1282
        """Find the file ids and versions affected by revisions.
1283
1283
 
1284
1284
        :param revisions: an iterable containing revision ids.
1285
 
        :param _inv_weave: The inventory weave from this repository or None.
1286
 
            If None, the inventory weave will be opened automatically.
1287
1285
        :return: a dictionary mapping altered file-ids to an iterable of
1288
1286
        revision_ids. Each altered file-ids has the exact revision_ids that
1289
1287
        altered it listed explicitly.
1290
1288
        """
1291
1289
        selected_revision_ids = set(revision_ids)
1292
 
        w = _inv_weave or self.get_inventory_weave()
 
1290
        w = self.get_inventory_weave()
1293
1291
        pb = ui.ui_factory.nested_progress_bar()
1294
1292
        try:
1295
1293
            return self._find_file_ids_from_xml_inventory_lines(
1451
1449
        inv_w = self.get_inventory_weave()
1452
1450
 
1453
1451
        # file ids that changed
1454
 
        file_ids = self.fileids_altered_by_revision_ids(revision_ids, inv_w)
 
1452
        file_ids = self.fileids_altered_by_revision_ids(revision_ids)
1455
1453
        count = 0
1456
1454
        num_file_ids = len(file_ids)
1457
1455
        for file_id, altered_versions in file_ids.iteritems():