~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/fetch.py

  • Committer: John Arbash Meinel
  • Date: 2010-08-23 19:10:35 UTC
  • mto: This revision was merged to the branch mainline in revision 5390.
  • Revision ID: john@arbash-meinel.com-20100823191035-57bojnmqw54nutsz
switch 'x += 1' to 'x = x + 1' to deal with brain-damaged old versions of pyrex.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
from bzrlib.lazy_import import lazy_import
29
29
lazy_import(globals(), """
30
30
from bzrlib import (
31
 
    graph as _mod_graph,
32
 
    static_tuple,
33
31
    tsort,
34
32
    versionedfile,
35
33
    )
37
35
import bzrlib
38
36
from bzrlib import (
39
37
    errors,
40
 
    symbol_versioning,
41
38
    ui,
42
39
    )
43
40
from bzrlib.revision import NULL_REVISION
249
246
        if len(revs) > 100:
250
247
            # XXX: not covered by tests, should have a flag to always run
251
248
            # this. -- mbp 20100129
252
 
            graph = _get_rich_root_heads_graph(self.source, revs)
 
249
            graph = self.source_repo.get_known_graph_ancestry(revs)
253
250
        new_roots_stream = _new_root_data_stream(
254
251
            root_id_order, rev_id_to_root_id, parent_map, self.source, graph)
255
252
        return [('texts', new_roots_stream)]
257
254
 
258
255
def _get_rich_root_heads_graph(source_repo, revision_ids):
259
256
    """Get a Graph object suitable for asking heads() for new rich roots."""
260
 
    st = static_tuple.StaticTuple
261
 
    revision_keys = [st(r_id).intern() for r_id in revision_ids]
262
 
    known_graph = source_repo.revisions.get_known_graph_ancestry(
263
 
                    revision_keys)
264
 
    return _mod_graph.GraphThunkIdsToKeys(known_graph)
 
257
    return 
265
258
 
266
259
 
267
260
def _new_root_data_stream(