~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/medium.py

  • Committer: Vincent Ladeuil
  • Date: 2010-02-09 17:15:17 UTC
  • mto: (5029.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5030.
  • Revision ID: v.ladeuil+lp@free.fr-20100209171517-1wzz1nh3d3nhnkbu
Move ReadonlyServer to bzrlib.tests.readonly

Show diffs side-by-side

added added

removed removed

Lines of Context:
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'
752
755
        # SmartClientStreamMedium stores the repr of this object in its
753
756
        # _DebugCounter so we have to store all the values used in our repr
754
757
        # method before calling the super init.
758
761
        self._vendor = vendor
759
762
        self._write_to = None
760
763
        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
 
        return "%s(connected=%r, username=%r, host=%r, port=%r)" % (
 
766
        if self._port is None:
 
767
            maybe_port = ''
 
768
        else:
 
769
            maybe_port = ':%s' % self._port
 
770
        return "%s(%s://%s@%s%s/)" % (
767
771
            self.__class__.__name__,
768
 
            self._connected,
 
772
            self._scheme,
769
773
            self._username,
770
774
            self._host,
771
 
            self._port)
 
775
            maybe_port)
772
776
 
773
777
    def _accept_bytes(self, bytes):
774
778
        """See SmartClientStreamMedium.accept_bytes."""