~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-07-23 12:09:44 UTC
  • mfrom: (6037.1.3 file-relative)
  • Revision ID: pqm@pqm.ubuntu.com-20110723120944-iot2mt9eu8qmbibo
(jelmer) Add support for file relative URLs with a scheme. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1577
1577
                extra='URLs must be properly escaped')
1578
1578
        location = urlutils.local_path_to_url(location)
1579
1579
 
1580
 
    if urlutils.is_url(location):
1581
 
        return location
1582
 
 
1583
 
    return urlutils.local_path_to_url(location)
 
1580
    if location.startswith("file:") and not location.startswith("file://"):
 
1581
        return urlutils.join(urlutils.local_path_to_url("."), location[5:])
 
1582
 
 
1583
    if not urlutils.is_url(location):
 
1584
        return urlutils.local_path_to_url(location)
 
1585
 
 
1586
    return location
1584
1587
 
1585
1588
 
1586
1589
def get_transport(base, possible_transports=None):