~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: 2008-06-18 03:28:27 UTC
  • mfrom: (3453.4.10 remote-is-at-least)
  • Revision ID: pqm@pqm.ubuntu.com-20080618032827-fq9wj33m0wfpurzv
Better infrastructure for tracking remote server version in
        SmartClientMedium. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
840
840
    def _get_parent_map(self, keys):
841
841
        """Helper for get_parent_map that performs the RPC."""
842
842
        medium = self._client._medium
843
 
        if not medium._remote_is_at_least_1_2:
 
843
        if medium._is_remote_before((1, 2)):
844
844
            # We already found out that the server can't understand
845
845
            # Repository.get_parent_map requests, so just fetch the whole
846
846
            # graph.
919
919
            medium.disconnect()
920
920
            # To avoid having to disconnect repeatedly, we keep track of the
921
921
            # fact the server doesn't understand remote methods added in 1.2.
922
 
            medium._remote_is_at_least_1_2 = False
 
922
            medium._remember_remote_is_before((1, 2))
923
923
            return self.get_revision_graph(None)
924
924
        response_tuple, response_handler = response
925
925
        if response_tuple[0] not in ['ok']:
1080
1080
 
1081
1081
    def get_data_stream_for_search(self, search):
1082
1082
        medium = self._client._medium
1083
 
        if not medium._remote_is_at_least_1_2:
 
1083
        if medium._is_remote_before((1, 2)):
1084
1084
            self._ensure_real()
1085
1085
            return self._real_repository.get_data_stream_for_search(search)
1086
1086
        REQUEST_NAME = 'Repository.stream_revisions_chunked'
1101
1101
            medium.disconnect()
1102
1102
            # To avoid having to disconnect repeatedly, we keep track of the
1103
1103
            # fact the server doesn't understand this remote method.
1104
 
            medium._remote_is_at_least_1_2 = False
 
1104
            medium._remember_remote_is_before((1, 2))
1105
1105
            self._ensure_real()
1106
1106
            return self._real_repository.get_data_stream_for_search(search)
1107
1107