Hacking, Software Collaboration, Testing and Diverse Other Topics of General Interest to the Practicing Programmer

Saturday, February 21, 2009

Neat trick

In Argentina I hacked up a little command for the 'launchpad' Bazaar plugin. It's a command line tool to open the Launchpad page for your branch in your web browser.
  $ cd ~/src/testresources/expose-reset-bug-271619
$ bzr lp-open
Opening https://code.edge.launchpad.net/~jml/testresources/expose-reset-bug-271619 in web browser
... and it works!

Available in Bazaar 1.12. Due to an unfortunate oversight, the NEWS file doesn't mention it.

7 comments:

Eduardo de Oliveira Padoan said...

Don't seem to work with local branches pushed (with --remember) to launchpad.

$ bzr lp-open
bzr: ERROR: There is no public branch set for ...

jml said...

Good point!

At the moment works based on the public location, which is different from the push location. I guess the push location could be used as a fallback.

jml said...

https://bugs.edge.launchpad.net/bzr/+bug/332372

bialix said...

$ bzr lp-open lp:qbzr

bzr: ERROR: There is no public branch set for "bzr+ssh://bazaar.launchpad.net/~qbzr-dev/qbzr/trunk/".

Your neat trick is a bit useless without public branch. Why I should have public branch for lp:qbzr branch anyway?

jml said...

bialix, the main use case for this was to open the pages of branches that you already have locally. The command you type ought to work though.

Do you know why having public branches set is useful in general?

bialix said...

IIRC, public branch settings used only by `bzr send` command, and maybe by pqm plugin (I'm not sure).

Your command just unclear in what it ought to do and why for it designed. So...

jml said...

There's a fix for the issues here in the Bazaar review queue: http://bundlebuggy.aaronbentley.com.

Twitter Updates

Blog Archive