How to open a branch with a launchpad url using bzrlib

Asked by Javier Collado on 2010-04-12

I'm trying to use bzrlib to open a remote branch using a launchpad url. However, it looks like before being able to do that, the url has to be mapped to a bzr+ssh one.

For example, if I try:
Branch.open('lp:bzr')
I get a NotBranchError exception.

But if I try:
Branch.open('bzr+ssh://bazaar.launchpad.net/~bzr-pqm/bzr/bzr.dev/')
The branch is opened correctly.

I've looked into the documentation here:
http://wiki.bazaar.canonical.com/Integrating_with_Bazaar
but haven't found any example with a launchpad url.

Please let me know how to open a branch with such an url. Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Javier Collado
Solved:
2010-04-12
Last query:
2010-04-12
Last reply:

This question was reopened

I've just found that I need to call bzrlib.plugin.load_plugins() before trying to open the branch so that the launchpad plugin can take over the responsibility to map the url correctly.