~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-09-16 05:45:47 UTC
  • mfrom: (5422.2.1 decrufting)
  • Revision ID: pqm@pqm.ubuntu.com-20100916054547-2zydmfmm1wsux8xj
(spiv) Remove some cruft apparently leftover from previous refactorings of
 InterDifferingSerializer. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3853
3853
                basis_id, delta, current_revision_id, parents_parents)
3854
3854
            cache[current_revision_id] = parent_tree
3855
3855
 
3856
 
    def _fetch_batch(self, revision_ids, basis_id, cache, a_graph=None):
 
3856
    def _fetch_batch(self, revision_ids, basis_id, cache):
3857
3857
        """Fetch across a few revisions.
3858
3858
 
3859
3859
        :param revision_ids: The revisions to copy
3860
3860
        :param basis_id: The revision_id of a tree that must be in cache, used
3861
3861
            as a basis for delta when no other base is available
3862
3862
        :param cache: A cache of RevisionTrees that we can use.
3863
 
        :param a_graph: A Graph object to determine the heads() of the
3864
 
            rich-root data stream.
3865
3863
        :return: The revision_id of the last converted tree. The RevisionTree
3866
3864
            for it will be in cache
3867
3865
        """
3935
3933
        if root_keys_to_create:
3936
3934
            root_stream = _mod_fetch._new_root_data_stream(
3937
3935
                root_keys_to_create, self._revision_id_to_root_id, parent_map,
3938
 
                self.source, graph=a_graph)
 
3936
                self.source)
3939
3937
            to_texts.insert_record_stream(root_stream)
3940
3938
        to_texts.insert_record_stream(from_texts.get_record_stream(
3941
3939
            text_keys, self.target._format._fetch_order,
3998
3996
        cache[basis_id] = basis_tree
3999
3997
        del basis_tree # We don't want to hang on to it here
4000
3998
        hints = []
4001
 
        if self._converting_to_rich_root and len(revision_ids) > 100:
4002
 
            a_graph = _mod_fetch._get_rich_root_heads_graph(self.source,
4003
 
                                                            revision_ids)
4004
 
        else:
4005
 
            a_graph = None
 
3999
        a_graph = None
4006
4000
 
4007
4001
        for offset in range(0, len(revision_ids), batch_size):
4008
4002
            self.target.start_write_group()
4010
4004
                pb.update('Transferring revisions', offset,
4011
4005
                          len(revision_ids))
4012
4006
                batch = revision_ids[offset:offset+batch_size]
4013
 
                basis_id = self._fetch_batch(batch, basis_id, cache,
4014
 
                                             a_graph=a_graph)
 
4007
                basis_id = self._fetch_batch(batch, basis_id, cache)
4015
4008
            except:
4016
4009
                self.source._safe_to_return_from_cache = False
4017
4010
                self.target.abort_write_group()