~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/__init__.py

[merge] robert

Show diffs side-by-side

added added

removed removed

Lines of Context:
366
366
        klass = getattr(mod, classname)
367
367
        return klass(base)
368
368
    register_transport(scheme, _loader)
369
 
    
370
 
# If nothing else matches, try the LocalTransport
 
369
 
 
370
 
 
371
def urlescape(relpath):
 
372
    """Escape relpath to be a valid url."""
 
373
    # TODO utf8 it first. utf8relpath = relpath.encode('utf8')
 
374
    import urllib
 
375
    return urllib.quote(relpath)
 
376
 
 
377
 
 
378
# None is the default transport, for things with no url scheme
371
379
register_lazy_transport(None, 'bzrlib.transport.local', 'LocalTransport')
372
380
register_lazy_transport('file://', 'bzrlib.transport.local', 'LocalTransport')
373
381
register_lazy_transport('sftp://', 'bzrlib.transport.sftp', 'SFTPTransport')