Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

If you visit a project on Launchpad, you can see all active branches of all developers involved in the project.

Is there a bzr command to do the same without visiting the project's page on Launchpad in a browser?

share|improve this question

1 Answer 1

up vote 8 down vote accepted

I don't know of any bzr command that does this, but it's actually very easy to script using the Launchpad python API. For instance:

#!/usr/bin/env python
import os, sys
from launchpadlib.launchpad import Launchpad

cachedir = os.path.expanduser("~/.launchpadlib/cache/")
launchpad = Launchpad.login_anonymously('find_branches',

    project = launchpad.projects[sys.argv[1]]
    for b in project.getBranches():
        if b.lifecycle_status not in ["Abandoned", "Merged"]:
            print b.bzr_identity
except KeyError:
    print "Project unknown... \nUsage: " + sys.argv[0] + " lp_project_name"

So with python find_branches.py deluge we get:


You can run wild with it and do things like sort by date_created, date_last_modified, or create your own heuristic for what branches are interesting to you. See:


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.