~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

MergeĀ fromĀ old-hpss-branch-implementation-test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
893
893
    def _get_parent_map(self, keys):
894
894
        """Helper for get_parent_map that performs the RPC."""
895
895
        medium = self._client._medium
896
 
        if not medium._is_remote_at_least((1, 2)):
 
896
        if medium._is_remote_before((1, 2)):
897
897
            # We already found out that the server can't understand
898
898
            # Repository.get_parent_map requests, so just fetch the whole
899
899
            # graph.
972
972
            medium.disconnect()
973
973
            # To avoid having to disconnect repeatedly, we keep track of the
974
974
            # fact the server doesn't understand remote methods added in 1.2.
975
 
            medium._remote_is_not((1, 2))
 
975
            medium._remember_remote_is_before((1, 2))
976
976
            return self.get_revision_graph(None)
977
977
        response_tuple, response_handler = response
978
978
        if response_tuple[0] not in ['ok']:
1133
1133
 
1134
1134
    def get_data_stream_for_search(self, search):
1135
1135
        medium = self._client._medium
1136
 
        if not medium._is_remote_at_least((1, 2)):
 
1136
        if medium._is_remote_before((1, 2)):
1137
1137
            self._ensure_real()
1138
1138
            return self._real_repository.get_data_stream_for_search(search)
1139
1139
        REQUEST_NAME = 'Repository.stream_revisions_chunked'
1154
1154
            medium.disconnect()
1155
1155
            # To avoid having to disconnect repeatedly, we keep track of the
1156
1156
            # fact the server doesn't understand this remote method.
1157
 
            medium._remote_is_not((1, 2))
 
1157
            medium._remember_remote_is_before((1, 2))
1158
1158
            self._ensure_real()
1159
1159
            return self._real_repository.get_data_stream_for_search(search)
1160
1160