~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/__init__.py

  • Committer: Vincent Ladeuil
  • Date: 2010-06-17 09:23:19 UTC
  • mfrom: (5301 +trunk)
  • mto: (5247.1.8 first-try)
  • mto: This revision was merged to the branch mainline in revision 5326.
  • Revision ID: v.ladeuil+lp@free.fr-20100617092319-da2bzdtf3j0voynf
Merge bzr.dev into cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
1551
1551
        return transport
1552
1552
 
1553
1553
 
1554
 
# We try to recognize an url lazily (ignoring user, password, etc)
1555
 
_urlRE = re.compile(r'^(?P<proto>[^:/\\]+)://(?P<rest>.*)$')
1556
 
 
1557
1554
def get_transport(base, possible_transports=None):
1558
1555
    """Open a transport to access a URL or directory.
1559
1556
 
1572
1569
    base = directories.dereference(base)
1573
1570
 
1574
1571
    def convert_path_to_url(base, error_str):
1575
 
        m = _urlRE.match(base)
1576
 
        if m:
 
1572
        if urlutils.is_url(base):
1577
1573
            # This looks like a URL, but we weren't able to
1578
1574
            # instantiate it as such raise an appropriate error
1579
1575
            # FIXME: we have a 'error_str' unused and we use last_err below