~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/__init__.py

Merge cleanup into first-try

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
""")
48
48
 
49
49
from bzrlib.symbol_versioning import (
50
 
        deprecated_method,
51
 
        deprecated_function,
52
50
        DEPRECATED_PARAMETER,
53
51
        )
54
52
from bzrlib.trace import (
1742
1740
register_lazy_transport('ftp://', 'bzrlib.transport.ftp', 'FtpTransport')
1743
1741
register_transport_proto('aftp://', help="Access using active FTP.")
1744
1742
register_lazy_transport('aftp://', 'bzrlib.transport.ftp', 'FtpTransport')
1745
 
 
1746
 
try:
1747
 
    import kerberos
1748
 
    kerberos_available = True
1749
 
except ImportError:
1750
 
    kerberos_available = False
1751
 
 
1752
 
if kerberos_available:
1753
 
    # Default to trying GSSAPI authentication (if the kerberos module is
1754
 
    # available)
1755
 
    register_transport_proto('ftp+gssapi://', register_netloc=True)
1756
 
    register_lazy_transport('ftp+gssapi://', 'bzrlib.transport.ftp._gssapi',
1757
 
                            'GSSAPIFtpTransport')
1758
 
    register_transport_proto('aftp+gssapi://', register_netloc=True)
1759
 
    register_lazy_transport('aftp+gssapi://', 'bzrlib.transport.ftp._gssapi',
1760
 
                            'GSSAPIFtpTransport')
1761
 
    register_transport_proto('ftp+nogssapi://', register_netloc=True)
1762
 
    register_transport_proto('aftp+nogssapi://', register_netloc=True)
1763
 
 
1764
 
    register_lazy_transport('ftp://', 'bzrlib.transport.ftp._gssapi',
1765
 
                            'GSSAPIFtpTransport')
1766
 
    register_lazy_transport('aftp://', 'bzrlib.transport.ftp._gssapi',
1767
 
                            'GSSAPIFtpTransport')
1768
 
    register_lazy_transport('ftp+nogssapi://', 'bzrlib.transport.ftp',
1769
 
                            'FtpTransport')
1770
 
    register_lazy_transport('aftp+nogssapi://', 'bzrlib.transport.ftp',
1771
 
                            'FtpTransport')
 
1743
register_transport_proto('gio+', help="Access using any GIO supported protocols.")
 
1744
register_lazy_transport('gio+', 'bzrlib.transport.gio_transport', 'GioTransport')
 
1745
 
 
1746
 
 
1747
# Default to trying GSSAPI authentication (if the kerberos module is
 
1748
# available)
 
1749
register_transport_proto('ftp+gssapi://', register_netloc=True)
 
1750
register_transport_proto('aftp+gssapi://', register_netloc=True)
 
1751
register_transport_proto('ftp+nogssapi://', register_netloc=True)
 
1752
register_transport_proto('aftp+nogssapi://', register_netloc=True)
 
1753
register_lazy_transport('ftp+gssapi://', 'bzrlib.transport.ftp._gssapi',
 
1754
                        'GSSAPIFtpTransport')
 
1755
register_lazy_transport('aftp+gssapi://', 'bzrlib.transport.ftp._gssapi',
 
1756
                        'GSSAPIFtpTransport')
 
1757
register_lazy_transport('ftp://', 'bzrlib.transport.ftp._gssapi',
 
1758
                        'GSSAPIFtpTransport')
 
1759
register_lazy_transport('aftp://', 'bzrlib.transport.ftp._gssapi',
 
1760
                        'GSSAPIFtpTransport')
 
1761
register_lazy_transport('ftp+nogssapi://', 'bzrlib.transport.ftp',
 
1762
                        'FtpTransport')
 
1763
register_lazy_transport('aftp+nogssapi://', 'bzrlib.transport.ftp',
 
1764
                        'FtpTransport')
1772
1765
 
1773
1766
register_transport_proto('memory://')
1774
1767
register_lazy_transport('memory://', 'bzrlib.transport.memory',