[merge] More helpful errors when missing a dependency
John Arbash Meinel
john at arbash-meinel.com
Fri Jul 7 22:47:57 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
In response to this bug:
https://launchpad.net/products/bzr/+bug/47821
or this one
https://launchpad.net/products/bzr/+bug/52204
And similar ones that keep cropping up, I created the attached bundle.
Since we now support having multiple Transports implement handling a
given protocol, I know just keep track of a 'last error', and if I am
unable to bind to a specific URL, I raise UnsupportedProtocol with that
error.
The old code used to try to use 'sftp://' as a local path (which was
very bad). After my encoding branch landed, it changed to reporting:
bzr: ERROR: Invalid url supplied to transport:
'sftp://localhost/~/,,xxx': Unsupported protocol: sftp
Which was better, but didn't tell you anything about why sftp was
supported. After the attached patch, the error changes to:
bzr: ERROR: Unsupported protocol for url "sftp://localhost/~/,,test":
Unable to import paramiko (required for sftp support): No module named
paramiko
Which may be a little bit too verbose, but I believe it should help
reduce the number of bug reports that we get. It not only tells them
what was wrong with the path they supplied, but I think it gives them a
hint as to how to fix it. (And if the module was just mis-configured,
then it would probably tell them that as well).
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFErtaNJdeBCYSNAAMRAjJfAJ4gLYPk8MG1GFW8xwyASgGsbU5WWwCeJlgk
e+jJEeoQaLv8yZkUaH/8ZE0=
=6oOz
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: unsupported-protocol.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20060707/fe633a5e/attachment.diff
More information about the bazaar
mailing list