~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

  • Committer: Martin Pool
  • Date: 2008-06-25 10:06:48 UTC
  • mfrom: (3509 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3510.
  • Revision ID: mbp@sourcefrog.net-20080625100648-ac20jxcm3ojucuby
merge trunk; remove RemoteToOtherFetcher

Show diffs side-by-side

added added

removed removed

Lines of Context:
825
825
    def _get_parent_map(self, keys):
826
826
        """Helper for get_parent_map that performs the RPC."""
827
827
        medium = self._client._medium
828
 
        if not medium._remote_is_at_least_1_2:
 
828
        if medium._is_remote_before((1, 2)):
829
829
            # We already found out that the server can't understand
830
830
            # Repository.get_parent_map requests, so just fetch the whole
831
831
            # graph.
904
904
            medium.disconnect()
905
905
            # To avoid having to disconnect repeatedly, we keep track of the
906
906
            # fact the server doesn't understand remote methods added in 1.2.
907
 
            medium._remote_is_at_least_1_2 = False
 
907
            medium._remember_remote_is_before((1, 2))
908
908
            return self.get_revision_graph(None)
909
909
        response_tuple, response_handler = response
910
910
        if response_tuple[0] not in ['ok']:
1481
1481
    @needs_write_lock
1482
1482
    def pull(self, source, overwrite=False, stop_revision=None,
1483
1483
             **kwargs):
1484
 
        # FIXME: This asks the real branch to run the hooks, which means
1485
 
        # they're called with the wrong target branch parameter. 
1486
 
        # The test suite specifically allows this at present but it should be
1487
 
        # fixed.  It should get a _override_hook_target branch,
1488
 
        # as push does.  -- mbp 20070405
1489
1484
        self._ensure_real()
1490
1485
        return self._real_branch.pull(
1491
1486
            source, overwrite=overwrite, stop_revision=stop_revision,
1492
 
            **kwargs)
 
1487
            _override_hook_target=self, **kwargs)
1493
1488
 
1494
1489
    @needs_read_lock
1495
1490
    def push(self, target, overwrite=False, stop_revision=None):