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

  • Committer: Robert Collins
  • Date: 2008-01-10 22:34:05 UTC
  • mto: This revision was merged to the branch mainline in revision 3184.
  • Revision ID: robertc@robertcollins.net-20080110223405-uuaxxfwv44b3ptp0
Create a RemoteRepository get_graph implementation and delegate get_parents_map to the real repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
from bzrlib import (
23
23
    branch,
24
24
    errors,
 
25
    graph,
25
26
    lockdir,
26
27
    repository,
27
28
    revision,
381
382
        
382
383
    def get_graph(self, other_repository=None):
383
384
        """Return the graph for this repository format"""
384
 
        self._ensure_real()
385
 
        return self._real_repository.get_graph(other_repository)
 
385
        parents_provider = self
 
386
        if (other_repository is not None and
 
387
            other_repository.bzrdir.transport.base !=
 
388
            self.bzrdir.transport.base):
 
389
            parents_provider = graph._StackedParentsProvider(
 
390
                [parents_provider, other_repository._make_parents_provider()])
 
391
        return graph.Graph(parents_provider)
386
392
 
387
393
    def gather_stats(self, revid=None, committers=None):
388
394
        """See Repository.gather_stats()."""
906
912
        return self._real_repository._check_for_inconsistent_revision_parents()
907
913
 
908
914
    def _make_parents_provider(self):
 
915
        return self
 
916
 
 
917
    def get_parent_map(self, keys):
 
918
        # Thunk across to real for now.
909
919
        self._ensure_real()
910
 
        return self._real_repository._make_parents_provider()
 
920
        return self._real_repository._make_parents_provider().get_parent_map(
 
921
            keys)
911
922
 
912
923
 
913
924
class RemoteBranchLockableFiles(LockableFiles):