/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: Andrew Bennetts
  • Date: 2007-04-16 02:56:19 UTC
  • mto: (2018.18.14 hpss-faster-copy)
  • mto: This revision was merged to the branch mainline in revision 2435.
  • Revision ID: andrew.bennetts@canonical.com-20070416025619-v6rjozkjjnrg970w
Rename call2 to call_expecting_body, and other small changes prompted by review.

Show diffs side-by-side

added added

removed removed

Lines of Context:
259
259
 
260
260
        path = self.bzrdir._path_for_remote_call(self._client)
261
261
        assert type(revision_id) is str
262
 
        response = self._client.call2(
 
262
        response = self._client.call_expecting_body(
263
263
            'Repository.get_revision_graph', path, revision_id)
264
264
        assert response[0][0] in ('ok', 'nosuchrevision'), 'unexpected response code %s' % (response[0],)
265
265
        if response[0][0] == 'ok':
301
301
            fmt_committers = 'no'
302
302
        else:
303
303
            fmt_committers = 'yes'
304
 
        response = self._client.call2('Repository.gather_stats', path,
305
 
                                      fmt_revid, fmt_committers)
 
304
        response = self._client.call_expecting_body(
 
305
            'Repository.gather_stats', path, fmt_revid, fmt_committers)
306
306
        assert response[0][0] == 'ok', \
307
307
            'unexpected response code %s' % (response[0],)
308
308
 
631
631
        """
632
632
        if path == 'branch.conf':
633
633
            path = self.bzrdir._path_for_remote_call(self._client)
634
 
            response = self._client.call2('Branch.get_config_file', path)
 
634
            response = self._client.call_expecting_body(
 
635
                'Branch.get_config_file', path)
635
636
            assert response[0][0] == 'ok', \
636
637
                'unexpected response code %s' % (response[0],)
637
638
            return StringIO(response[1].read_body_bytes())
862
863
    def _gen_revision_history(self):
863
864
        """See Branch._gen_revision_history()."""
864
865
        path = self.bzrdir._path_for_remote_call(self._client)
865
 
        response = self._client.call2('Branch.revision_history', path)
866
 
        assert response[0][0] == 'ok', 'unexpected response code %s' % (response[0],)
 
866
        response = self._client.call_expecting_body(
 
867
            'Branch.revision_history', path)
 
868
        assert response[0][0] == 'ok', ('unexpected response code %s'
 
869
                                        % (response[0],))
867
870
        result = response[1].read_body_bytes().split('\x00')
868
871
        if result == ['']:
869
872
            return []