/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/fetch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-04-10 18:03:54 UTC
  • mfrom: (4913.4.4 get-known-graph-ancestry)
  • Revision ID: pqm@pqm.ubuntu.com-20100410180354-4dft6p3nf7fvg50f
(Jelmer) Add Repository.get_known_graph_ancestry().

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
    )
249
247
        if len(revs) > 100:
250
248
            # XXX: not covered by tests, should have a flag to always run
251
249
            # this. -- mbp 20100129
252
 
            graph = _get_rich_root_heads_graph(self.source, revs)
 
250
            graph = self.source_repo.get_known_graph_ancestry(revs)
253
251
        new_roots_stream = _new_root_data_stream(
254
252
            root_id_order, rev_id_to_root_id, parent_map, self.source, graph)
255
253
        return [('texts', new_roots_stream)]
257
255
 
258
256
def _get_rich_root_heads_graph(source_repo, revision_ids):
259
257
    """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)
 
258
    return 
265
259
 
266
260
 
267
261
def _new_root_data_stream(