~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/fetch.py

  • Committer: Jelmer Vernooij
  • Date: 2010-04-30 11:03:59 UTC
  • mto: This revision was merged to the branch mainline in revision 5197.
  • Revision ID: jelmer@samba.org-20100430110359-ow3e3grh7sxy93pa
Remove more unused imports.

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,
31
33
    tsort,
32
34
    versionedfile,
33
35
    )
246
248
        if len(revs) > 100:
247
249
            # XXX: not covered by tests, should have a flag to always run
248
250
            # this. -- mbp 20100129
249
 
            graph = self.source_repo.get_known_graph_ancestry(revs)
 
251
            graph = _get_rich_root_heads_graph(self.source, revs)
250
252
        new_roots_stream = _new_root_data_stream(
251
253
            root_id_order, rev_id_to_root_id, parent_map, self.source, graph)
252
254
        return [('texts', new_roots_stream)]
254
256
 
255
257
def _get_rich_root_heads_graph(source_repo, revision_ids):
256
258
    """Get a Graph object suitable for asking heads() for new rich roots."""
257
 
    return 
 
259
    st = static_tuple.StaticTuple
 
260
    revision_keys = [st(r_id).intern() for r_id in revision_ids]
 
261
    known_graph = source_repo.revisions.get_known_graph_ancestry(
 
262
                    revision_keys)
 
263
    return _mod_graph.GraphThunkIdsToKeys(known_graph)
258
264
 
259
265
 
260
266
def _new_root_data_stream(