–fixes lp:1234

As I’ve said before, Launchpad is pretty big. Getting to know everything you can to do in Launchpad can take a while.

Of course, there are the user guide, the tour and the dev wiki even has a feature check-list. It’s still easy to miss things.

So, I’m turning the fifth day of each week into Feature Friday 🙂

I’m gonna kick off with something I use a lot and that, to be honest, is more a Bazaar feature, than a Launchpad feature:

bzr commit -m "Adds email functionality to the client, thereby obeying Zawinski's law." --fixes lp:1234

Adding --fixes lp:1234 to a commit tells Bazaar that the branch contains a fix for bug 1234 tracked in Launchpad.

The next time you push the branch to Launchpad, Launchpad will create a link between the branch and bug 1234.

4 Responses to “–fixes lp:1234”

  1. Daniel Bell Says:

    Hi Matthew, great tip, but quick question.

    Can you set multiple bugs to be fixed with the -fixes or is it limited to only 1 bug per commit?

  2. someone Says:

    How does bzr associate the commit and the bug? Does it use the commit message like GitHub?

  3. Marius Gedminas Says:

    Pet peeve #1: I have to specify –fixes before I start typing the commit message. I always review my diff while I edit the commit message and often abort the commit to fix something, re-run tests, and re-run bzr commit. I *always* forget the –fixes when I do the latter.

    Pet peeve #2: Launchpad associates the *branch* with the bug fix not the *commit*. For me this is very inconsistent, since I have to specify –fixes for a commit, not for a branch. I don’t use bugfix branches (’cause Bazaar is too slow and/or too inconvenient), so Launchpad keeps associating my mainline branch with random bugfixes.

    Because of both of these I’ve mostly stopped using –fixes.

  4. Aj00200 Says:

    @Daniel Bell yes, it is possible to specify multiple bugs in one commit. You use –fixes multiple times. For example: bzr commit -m “Fixes some bugs” –fixes lp:1234 –fixes lp:5678

Leave a Reply