~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-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:
40
40
    lru_cache,
41
41
    osutils,
42
42
    revision as _mod_revision,
 
43
    static_tuple,
43
44
    symbol_versioning,
44
45
    trace,
45
46
    tsort,
2626
2627
    def _make_parents_provider(self):
2627
2628
        return self
2628
2629
 
 
2630
    @needs_read_lock
 
2631
    def get_known_graph_ancestry(self, revision_ids):
 
2632
        """Return the known graph for a set of revision ids and their ancestors.
 
2633
        """
 
2634
        st = static_tuple.StaticTuple
 
2635
        revision_keys = [st(r_id).intern() for r_id in revision_ids]
 
2636
        known_graph = self.revisions.get_known_graph_ancestry(revision_keys)
 
2637
        return graph.GraphThunkIdsToKeys(known_graph)
 
2638
 
2629
2639
    def get_graph(self, other_repository=None):
2630
2640
        """Return the graph walker for this repository format"""
2631
2641
        parents_provider = self._make_parents_provider()