~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/medium.py

  • Committer: Ian Clatworthy
  • Date: 2009-09-09 00:49:50 UTC
  • mto: (4634.37.2 prepare-2.0)
  • mto: This revision was merged to the branch mainline in revision 4689.
  • Revision ID: ian.clatworthy@canonical.com-20090909004950-43z4zdicb5u91iet
tweak quick reference naming to make it consistent with other PDFs

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
from bzrlib.lazy_import import lazy_import
34
34
lazy_import(globals(), """
35
35
import atexit
36
 
import thread
37
36
import weakref
38
 
 
39
37
from bzrlib import (
40
38
    debug,
41
39
    errors,
297
295
        self.finished = True
298
296
 
299
297
    def _write_out(self, bytes):
300
 
        tstart = osutils.timer_func()
301
298
        osutils.send_all(self.socket, bytes, self._report_activity)
302
 
        if 'hpss' in debug.debug_flags:
303
 
            thread_id = thread.get_ident()
304
 
            trace.mutter('%12s: [%s] %d bytes to the socket in %.3fs'
305
 
                         % ('wrote', thread_id, len(bytes),
306
 
                            osutils.timer_func() - tstart))
307
299
 
308
300
 
309
301
class SmartServerPipeStreamMedium(SmartServerStreamMedium):
749
741
        self._password = password
750
742
        self._port = port
751
743
        self._username = username
752
 
        # for the benefit of progress making a short description of this
753
 
        # transport
754
 
        self._scheme = 'bzr+ssh'
755
744
        # SmartClientStreamMedium stores the repr of this object in its
756
745
        # _DebugCounter so we have to store all the values used in our repr
757
746
        # method before calling the super init.
761
750
        self._vendor = vendor
762
751
        self._write_to = None
763
752
        self._bzr_remote_path = bzr_remote_path
 
753
        # for the benefit of progress making a short description of this
 
754
        # transport
 
755
        self._scheme = 'bzr+ssh'
764
756
 
765
757
    def __repr__(self):
766
 
        if self._port is None:
767
 
            maybe_port = ''
768
 
        else:
769
 
            maybe_port = ':%s' % self._port
770
 
        return "%s(%s://%s@%s%s/)" % (
 
758
        return "%s(connected=%r, username=%r, host=%r, port=%r)" % (
771
759
            self.__class__.__name__,
772
 
            self._scheme,
 
760
            self._connected,
773
761
            self._username,
774
762
            self._host,
775
 
            maybe_port)
 
763
            self._port)
776
764
 
777
765
    def _accept_bytes(self, bytes):
778
766
        """See SmartClientStreamMedium.accept_bytes."""