~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/protocol.py

  • Committer: John Arbash Meinel
  • Date: 2007-07-31 20:38:47 UTC
  • mto: This revision was merged to the branch mainline in revision 2688.
  • Revision ID: john@arbash-meinel.com-20070731203847-2k1kby0spd95pcr2
Switch around what bytes get logged.
Don't bother writing the header bytes, because you know what was
written by the tuple you see logged.

Show diffs side-by-side

added added

removed removed

Lines of Context:
314
314
        """
315
315
        if 'hpss' in debug.debug_flags:
316
316
            mutter('hpss call w/body: %s (%r...)', repr(args)[1:-1], body[:20])
317
 
            mutter('         %8d bytes', len(body))
 
317
            mutter('              %d bytes', len(body))
318
318
            self._request_start_time = time.time()
319
319
        self._write_args(args)
320
320
        bytes = self._encode_bulk_data(body)
336
336
        self._request.accept_bytes(bytes)
337
337
        self._request.finished_writing()
338
338
        if 'hpss' in debug.debug_flags:
339
 
            mutter('         %8d bytes', len(readv_bytes))
 
339
            mutter('              %d bytes in readv request', len(readv_bytes))
340
340
 
341
341
    def cancel_read_body(self):
342
342
        """After expecting a body, a response code may indicate one otherwise.
361
361
                self._request_start_time = None
362
362
            else:
363
363
                mutter('   result:   %s', repr(result)[1:-1])
364
 
            mutter('         %8d bytes written',
365
 
                   self._request._bytes_written)
366
364
        if not expect_body:
367
365
            self._request.finished_reading()
368
366
        return result
385
383
        self._body_buffer = StringIO(_body_decoder.read_pending_data())
386
384
        # XXX: TODO check the trailer result.
387
385
        if 'hpss' in debug.debug_flags:
388
 
            mutter('         %8d body bytes read',
 
386
            mutter('              %d body bytes read',
389
387
                   len(self._body_buffer.getvalue()))
390
388
        return self._body_buffer.read(count)
391
389