~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.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:
29
29
    repository,
30
30
    revision,
31
31
    revision as _mod_revision,
 
32
    static_tuple,
32
33
    symbol_versioning,
33
34
)
34
35
from bzrlib.branch import BranchReferenceFormat
903
904
        parents_provider = self._make_parents_provider(other_repository)
904
905
        return graph.Graph(parents_provider)
905
906
 
 
907
    @needs_read_lock
 
908
    def get_known_graph_ancestry(self, revision_ids):
 
909
        """Return the known graph for a set of revision ids and their ancestors.
 
910
        """
 
911
        st = static_tuple.StaticTuple
 
912
        revision_keys = [st(r_id).intern() for r_id in revision_ids]
 
913
        known_graph = self.revisions.get_known_graph_ancestry(revision_keys)
 
914
        return graph.GraphThunkIdsToKeys(known_graph)
 
915
 
906
916
    def gather_stats(self, revid=None, committers=None):
907
917
        """See Repository.gather_stats()."""
908
918
        path = self.bzrdir._path_for_remote_call(self._client)