Comment 1 for bug 483689

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 483689] [NEW] bzr register-branch to an lp: url causes crash

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew Johnson wrote:
> Public bug reported:
>
> I realize now that this was a user error, but it probably should result
> in a more friendly error message explaining that you should just push
> the branch to lp: without needing to register it first. This was the
> command and its output:
>
> tux% bzr register-branch -v lp:~anj/+junk/base-3.14.2 --branch-title='testing'
> launchpad.net password for <email address hidden>: :
> bzr: ERROR: xmlrpclib.Fault: <Fault 120: 'Invalid URL: lp:~anj/+junk/base-3.14.2\nThe URI scheme "lp" is not allowed. Only URIs with the following schemes may be used: bzr+ssh, ftp, http, https, sftp'>
>
> Traceback (most recent call last):
> File "/home/phoebus/ANJ/Linux/lib/python/bzrlib/commands.py", line 842, in exception_to_return_code
> return the_callable(*args, **kwargs)
> File "/home/phoebus/ANJ/Linux/lib/python/bzrlib/commands.py", line 1037, in run_bzr
> ret = run(*run_argv)
> File "/home/phoebus/ANJ/Linux/lib/python/bzrlib/commands.py", line 654, in run_argv_aliases
> return self.run(**all_cmd_args)
> File "/home/phoebus/ANJ/Linux/lib/python/bzrlib/plugins/launchpad/__init__.py", line 150, in run
> branch_object_url = rego.submit(service)
> File "/home/phoebus/ANJ/Linux/lib/python/bzrlib/plugins/launchpad/lp_registration.py", line 239, in submit
> self._authenticated)
> File "/home/phoebus/ANJ/Linux/lib/python/bzrlib/plugins/launchpad/lp_registration.py", line 166, in send_request
> result = method(*method_params)
> File "/usr/lib/python2.5/xmlrpclib.py", line 1150, in __call__
> return self.__send(self.__name, args)
> File "/usr/lib/python2.5/xmlrpclib.py", line 1440, in __request
> verbose=self.__verbose
> File "/usr/lib/python2.5/xmlrpclib.py", line 1204, in request
> return self._parse_response(h.getfile(), sock)
> File "/usr/lib/python2.5/xmlrpclib.py", line 1343, in _parse_response
> return u.close()
> File "/usr/lib/python2.5/xmlrpclib.py", line 790, in close
> raise Fault(**self._stack[0])
> Fault: <Fault 120: 'Invalid URL: lp:~anj/+junk/base-3.14.2\nThe URI scheme "lp" is not allowed. Only URIs with the following schemes may be used: bzr+ssh, ftp, http, https, sftp'>
>
> bzr 2.0.2 on python 2.5.2 (Linux-2.6.27.21-170.2.56.fc10.i686-i686-with-fedora-10-Cambridge)
> arguments: ['/home/phoebus/ANJ/Linux/bin/bzr', 'register-branch', '-v', 'lp:~anj/+junk/base-3.14.2', '--branch-title=EPICS Base 3.14 branch snapshot, testing']
> encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
> plugins:
> fastimport /home/phoebus/ANJ/.bazaar/plugins/fastimport [0.9.0dev]
> launchpad /home/phoebus/ANJ/Linux/lib/python/bzrlib/plugins/launchpad [2.0.2]
> netrc_credential_store /home/phoebus/ANJ/Linux/lib/python/bzrlib/plugins/netrc_credential_store [2.0.2]
> svn /home/phoebus/ANJ/.bazaar/plugins/svn [1.0.1]
>
> *** Bazaar has encountered an internal error. This probably indicates a
> bug in Bazaar. You can help us fix it by filing a bug report at
> https://bugs.launchpad.net/bzr/+filebug
> including this traceback and a description of the problem.
>
> ** Affects: bzr
> Importance: Undecided
> Status: New
>

This seems like we should just be suppressing the "Fault" exception, and
at least just showing the "pretty" error that launchpad is giving us.
I'm not sure why the xmlrpc response is giving a fatal Fault that looks
like it is a programming error (hence the traceback) rather than a
semi-expected "you're not allowed to do that" sort of exception.

 affects bzr
 importance medium
 status confirmed

Including launchpad-code as I think they do parts of the launchpad
plugin maintenance.

 affects launchpad-code

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksBiTUACgkQJdeBCYSNAAP1PQCfX+wkPJvRlqBy8fURmo8+Jtk0
6gEAn0wf7nwsxRQGGehx/El7lMplzkhi
=+Q+Y
-----END PGP SIGNATURE-----