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.
Under the upstream repository name, click Pull requests. In the list of pull requests, navigate to the pull request that you'd like to allow commits on. On user-owned forks, if you want to allow anyone with push access to the upstream repository to make changes to your pull request, select Allow edits from maintainers.
A pull request – also referred to as a merge request – is an event that takes place in software development when a contributor/developer is ready to begin the process of merging new code changes with the main project repository.
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):
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)
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.
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.
I managed to do this in a more straightforward way for http://launchpad.net/ubuntu-dev-tools:
bzr branch lp:ubuntu-dev-tools # git clone ...
cd ubuntu-dev-tools
...
bzr launchpad-login techtonik
bzr commit
bzr push lp:~techtonik/ubuntu-dev-tools/minor-python3-fix
Went https://code.launchpad.net/~techtonik/ubuntu-dev-tools/minor-python3-fix and hit "Propose for merging". Here is the result.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With