~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/fetch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-09-17 09:12:11 UTC
  • mfrom: (5430.1.2 merge-2.2-into-devel)
  • Revision ID: pqm@pqm.ubuntu.com-20100917091211-1e9h9nf6bsdjr6bd
(spiv) Merge lp:bzr/2.2, including fixes for #625574, #636930,
        #254278.

Show diffs side-by-side

added added

removed removed

Lines of Context:
182
182
    This is for use by fetchers and converters.
183
183
    """
184
184
 
 
185
    # This is a class variable so that the test suite can override it.
 
186
    known_graph_threshold = 100
 
187
 
185
188
    def __init__(self, source):
186
189
        """Constructor.
187
190
 
243
246
        # yet, and are unlikely to in non-rich-root environments anyway.
244
247
        root_id_order.sort(key=operator.itemgetter(0))
245
248
        # Create a record stream containing the roots to create.
246
 
        if len(revs) > 100:
247
 
            # XXX: not covered by tests, should have a flag to always run
248
 
            # this. -- mbp 20100129
249
 
            graph = self.source_repo.get_known_graph_ancestry(revs)
 
249
        if len(revs) > self.known_graph_threshold:
 
250
            graph = self.source.get_known_graph_ancestry(revs)
250
251
        new_roots_stream = _new_root_data_stream(
251
252
            root_id_order, rev_id_to_root_id, parent_map, self.source, graph)
252
253
        return [('texts', new_roots_stream)]