~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/medium.py

  • Committer: Jelmer Vernooij
  • Date: 2012-01-05 16:03:11 UTC
  • mfrom: (6432 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6433.
  • Revision ID: jelmer@samba.org-20120105160311-12o5p67kin1v3zps
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
bzrlib/transport/smart/__init__.py.
25
25
"""
26
26
 
 
27
from __future__ import absolute_import
 
28
 
27
29
import errno
28
30
import os
29
31
import sys
30
32
import time
31
 
import urllib
32
33
 
33
34
import bzrlib
34
35
from bzrlib.lazy_import import lazy_import
42
43
    debug,
43
44
    errors,
44
45
    trace,
 
46
    transport,
45
47
    ui,
46
48
    urlutils,
47
49
    )
840
842
        """
841
843
        medium_base = urlutils.join(self.base, '/')
842
844
        rel_url = urlutils.relative_url(medium_base, transport.base)
843
 
        return urllib.unquote(rel_url)
 
845
        return urlutils.unquote(rel_url)
844
846
 
845
847
 
846
848
class SmartClientStreamMedium(SmartClientMedium):
1020
1022
            raise AssertionError(
1021
1023
                "Unexpected io_kind %r from %r"
1022
1024
                % (io_kind, self._ssh_connection))
 
1025
        for hook in transport.Transport.hooks["post_connect"]:
 
1026
            hook(self)
1023
1027
 
1024
1028
    def _flush(self):
1025
1029
        """See SmartClientStreamMedium._flush()."""
1128
1132
            raise errors.ConnectionError("failed to connect to %s:%d: %s" %
1129
1133
                    (self._host, port, err_msg))
1130
1134
        self._connected = True
 
1135
        for hook in transport.Transport.hooks["post_connect"]:
 
1136
            hook(self)
1131
1137
 
1132
1138
 
1133
1139
class SmartClientAlreadyConnectedSocketMedium(SmartClientSocketMedium):