~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: 2010-06-15 04:32:49 UTC
  • mfrom: (5254.2.5 534787-pull-lp-in-config)
  • Revision ID: pqm@pqm.ubuntu.com-20100615043249-b5xx4yeyfyfbfyav
(spiv) Fix 'bzr pull' when lp: URL explicitly defined in
        locations.conf or branch.conf. (Gordon Tyler, #534787)

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