~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/transport_util.py

  • Committer: Andrew Bennetts
  • Date: 2010-10-08 04:25:10 UTC
  • mto: This revision was merged to the branch mainline in revision 5472.
  • Revision ID: andrew.bennetts@canonical.com-20101008042510-sg9vdhmnggilzxsk
Fix stray TAB in source.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
import bzrlib.hooks
18
 
from bzrlib import transport
19
18
from bzrlib.tests import features
20
19
 
21
20
# SFTPTransport offers better performances but relies on paramiko, if paramiko
35
34
 
36
35
from bzrlib.transport import (
37
36
    ConnectedTransport,
 
37
    get_transport,
38
38
    register_transport,
39
39
    register_urlparse_netloc_protocol,
40
40
    unregister_transport,
47
47
    """Dict-mapping hook name to a list of callables for transport hooks"""
48
48
 
49
49
    def __init__(self):
50
 
        super(TransportHooks, self).__init__("bzrlib.tests.transport_util",
51
 
            "InstrumentedTransport.hooks")
 
50
        super(TransportHooks, self).__init__()
52
51
        # Invoked when the transport has just created a new connection.
53
52
        # The api signature is (transport, connection, credentials)
54
53
        self['_set_connection'] = []
112
111
        # standard test support code will work and permit the server url
113
112
        # correctly.
114
113
        url = self.get_url()
115
 
        t = transport.get_transport(url)
 
114
        t = get_transport(url)
116
115
        if t.base.endswith('work/'):
117
116
            t = t.clone('../..')
118
117
        self.permit_url(t.base)