~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/medium.py

Add a NEWS entry and prepare submission.

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
 
36
import threading
37
37
import weakref
38
38
 
39
39
from bzrlib import (
300
300
        tstart = osutils.timer_func()
301
301
        osutils.send_all(self.socket, bytes, self._report_activity)
302
302
        if 'hpss' in debug.debug_flags:
303
 
            thread_id = thread.get_ident()
 
303
            thread_id = threading.currentThread().ident
304
304
            trace.mutter('%12s: [%s] %d bytes to the socket in %.3fs'
305
305
                         % ('wrote', thread_id, len(bytes),
306
306
                            osutils.timer_func() - tstart))
749
749
        self._password = password
750
750
        self._port = port
751
751
        self._username = username
752
 
        # for the benefit of progress making a short description of this
753
 
        # transport
754
 
        self._scheme = 'bzr+ssh'
755
752
        # SmartClientStreamMedium stores the repr of this object in its
756
753
        # _DebugCounter so we have to store all the values used in our repr
757
754
        # method before calling the super init.
761
758
        self._vendor = vendor
762
759
        self._write_to = None
763
760
        self._bzr_remote_path = bzr_remote_path
 
761
        # for the benefit of progress making a short description of this
 
762
        # transport
 
763
        self._scheme = 'bzr+ssh'
764
764
 
765
765
    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/)" % (
 
766
        return "%s(connected=%r, username=%r, host=%r, port=%r)" % (
771
767
            self.__class__.__name__,
772
 
            self._scheme,
 
768
            self._connected,
773
769
            self._username,
774
770
            self._host,
775
 
            maybe_port)
 
771
            self._port)
776
772
 
777
773
    def _accept_bytes(self, bytes):
778
774
        """See SmartClientStreamMedium.accept_bytes."""