InvalidURL "no supported schemes" resolving missing branch without launchpad login

Bug #854713 reported by John A Meinel
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
John A Meinel
Breezy
Triaged
Low
Unassigned

Bug Description

I'm trying to build the bzr-2.5 installers. One piece of that is the bzr-rewrite plugin. However, the build machine does not have a 'launchpad_username" because I didn't want to add ssh keys to that machine. As such, it normally resolves the "lp:*" URLs to HTTP URLs, which it can download just fine.

$ bzr info lp:bzr-rewrite -Derror
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
bzr: ERROR: bzrlib.errors.InvalidURL: Invalid url supplied to transport: "bzr+ssh://bazaar.launchpad.net/+branch/bzr-rew
rite": no supported schemes

Traceback (most recent call last):
  File "C:\dev\bzr\bzr.dev\bzrlib\commands.py", line 918, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "C:\dev\bzr\bzr.dev\bzrlib\commands.py", line 1118, in run_bzr
    ret = run(*run_argv)
  File "C:\dev\bzr\bzr.dev\bzrlib\commands.py", line 676, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "C:\dev\bzr\bzr.dev\bzrlib\commands.py", line 698, in run
    return self._operation.run_simple(*args, **kwargs)
  File "C:\dev\bzr\bzr.dev\bzrlib\cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "C:\dev\bzr\bzr.dev\bzrlib\cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "C:\dev\bzr\bzr.dev\bzrlib\commands.py", line 1133, in ignore_pipe
    result = func(*args, **kwargs)
  File "C:\dev\bzr\bzr.dev\bzrlib\builtins.py", line 1595, in run
    show_bzrdir_info(bzrdir.BzrDir.open_containing(location)[0],
  File "C:\dev\bzr\bzr.dev\bzrlib\bzrdir.py", line 873, in open_containing
    transport = _mod_transport.get_transport(url, possible_transports)
  File "C:\dev\bzr\bzr.dev\bzrlib\transport\__init__.py", line 1644, in get_transport
    return get_transport_from_url(location_to_url(base), possible_transports)
  File "C:\dev\bzr\bzr.dev\bzrlib\transport\__init__.py", line 1566, in location_to_url
    location = directories.dereference(location)
  File "C:\dev\bzr\bzr.dev\bzrlib\directory_service.py", line 63, in dereference
    return service().look_up(name, url)
  File "C:\dev\bzr\bzr.dev\bzrlib\plugins\launchpad\lp_directory.py", line 66, in look_up
    return self._resolve(url)
  File "C:\dev\bzr\bzr.dev\bzrlib\plugins\launchpad\lp_directory.py", line 199, in _resolve
    raise errors.InvalidURL(path=url, extra='no supported schemes')
InvalidURL: Invalid url supplied to transport: "bzr+ssh://bazaar.launchpad.net/+branch/bzr-rewrite": no supported scheme
s

Note that I can reproduce this failure on my local machine, if I comment out my "launchpad_username". And it fails with both bzr-2.2.2 on the Build machine, and with bzr-2.5.0dev2 rev 6143 on my local machine (and on the build machine).

Going further, it actually fails if I set my launchpad username:
$ bzr info lp:bzr-rewrite -Derror
Connected (version 2.0, client Twisted)
Authentication (publickey) successful!
Secsh channel 1 opened.
Transferred: 1kB (0.2kB/s r:0kB w:0kB)
bzr: ERROR: bzrlib.errors.NotBranchError: Not a branch: "bzr+ssh://bazaar.launchpad.net/+branch/bzr-rewrite/".

Traceback (most recent call last):
  File "C:\dev\bzr\bzr.dev\bzrlib\commands.py", line 918, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "C:\dev\bzr\bzr.dev\bzrlib\commands.py", line 1118, in run_bzr
    ret = run(*run_argv)
  File "C:\dev\bzr\bzr.dev\bzrlib\commands.py", line 676, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "C:\dev\bzr\bzr.dev\bzrlib\commands.py", line 698, in run
    return self._operation.run_simple(*args, **kwargs)
  File "C:\dev\bzr\bzr.dev\bzrlib\cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "C:\dev\bzr\bzr.dev\bzrlib\cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "C:\dev\bzr\bzr.dev\bzrlib\commands.py", line 1133, in ignore_pipe
    result = func(*args, **kwargs)
  File "C:\dev\bzr\bzr.dev\bzrlib\builtins.py", line 1595, in run
    show_bzrdir_info(bzrdir.BzrDir.open_containing(location)[0],
  File "C:\dev\bzr\bzr.dev\bzrlib\bzrdir.py", line 874, in open_containing
    return BzrDir.open_containing_from_transport(transport)
  File "C:\dev\bzr\bzr.dev\bzrlib\bzrdir.py", line 906, in open_containing_from_transport
    raise errors.NotBranchError(path=url)
NotBranchError: Not a branch: "bzr+ssh://bazaar.launchpad.net/+branch/bzr-rewrite/".
HPSS calls: 3 (0 vfs) SmartSSHClientMedium(bzr+ssh://<email address hidden>/)

Looking at:
  https://launchpad.net/bzr-rewrite/trunk

It looks like the trunk development series no longer has an associated branch. I'll try to follow up with Jelmer to sort this out.

(This may not be a bzr bug, but I'm marking it Critical because I can't build the bzr-2.5 installers without fixing it.)

Revision history for this message
John A Meinel (jameinel) wrote :

Note that there probably is a bzr bug in here somewhere. Specifically the original failure case is quite confusing:
bzr: ERROR: Invalid url supplied to transport: "bzr+ssh://bazaar.launchpad.net/+branch/bzr-rewrite":
 no supported schemes

bzr+ssh certainly looks like it would be a supported scheme.

At least one bug is that the _resolve code is re-using the 'url' parameter, rather than raising the original url.

Revision history for this message
John A Meinel (jameinel) wrote :

The 'critical' part was that I couldn't access bzr-rewrite, which was just an issue that Jelmer hadn't linked the trunk branch after moving it.
The 'still a bug' part is that we give a confusing error when this sort of thing happens.

Changed in bzr:
importance: Critical → Medium
Martin Packman (gz)
summary: - Unable to resolve "lp:bzr-rewrite"
+ InvalidURL "no supported schemes" resolving missing branch without
+ launchpad login
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
Changed in brz:
status: New → Triaged
importance: Undecided → Low
tags: added: error-reporting ui
removed: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.