bazaarpull-requestlaunchpad

Launchpad pull request


I want to propose a change to the source code of a project which is hosted in Launchpad.

Problem is: I have no idea how to use the bazaar version control system, and I've never used Launchpad, so what are the equivalent steps of making a Github pull request, but applied to this system?

I have read some tutorials, and they are insanely long and not very straightforward, for something that should be really simple.


Solution

  • Alright, no need to read a doctoral thesis about it, or single documentation chapters that lack details about the bazaar VCS that you don't know (or don't care to know).

    This is the definitive and simplest step-by-step guide (especially for devs already used to the git/github workflow):

    Your target project is https://launchpad.net/foo, clone it:

    bzr init-repo foo
    

    (creates directory "foo" which will have all our branches of the repo)

    cd foo 
    bzr branch lp:foo/trunk trunk # if this fails, visit https://launchpad.net/foo/trunk
    

    (clone the 'master' branch into the "trunk" folder)

    bzr branch trunk fixicate-the-bar-to-do-baz
    

    (creates a feature branch locally)

    cd fixicate-the-bar-to-do-baz
    

    (now you can make your changes)

    bzr add some_new_file.bla some_new_folder.dir
    

    (if you need to add newly created files/dirs to the commit; no need to do this for modified ones)

    EDITOR=nano bzr commit --fixes lp:99999
    

    (if your favourite editor is "nano" and if you are fixing a launchpad bug, number 99999, with the commit)

    Propose the pull request (or 'merge-request', in the launchpad dialect):

    bzr push lp:~usernameinlaunchpad/foo/fixicate-the-bar-to-do-baz
    

    (to push your branch remotely to your launchpad code forks)

    https://code.launchpad.net/~usernameinlaunchpad/foo/fixicate-the-bar-to-do-baz/+register-merge
    

    (the URL to direct your browser to propose your change upstream)

    IMPORTANT!: In the last step (when you're creating the merge-request in that webpage), expand the "Extra options" element, and fill in the commit message (even if it says "optional", and even if you already added a commit message when doing bzr commit), otherwise the Ubuntu Jenkins Bot will revert your commit after it gets merged.

    About the review process:

    You will get an email when there is a review from any person. But beware, it's not enough that a maintainer marks your patch as Review: Approve. The merge-request's status needs also to change from Needs review to Approved. And you will get both changes in separate e-mails. Don't hesitate to bother the maintainer about doing both changes, not just the first, otherwise your merge-request will sit as approved forever, without being merged by the launchpad bots.