DevelopmentToolsUsage

Differences between revisions 4 and 5
Revision 4 as of 2015-01-27 20:12:40
Size: 3876
Editor: xdsl-83-150-81-40
Comment:
Revision 5 as of 2015-01-27 20:38:38
Size: 3975
Editor: xdsl-83-150-81-40
Comment:
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
This tutorial expects you to have [[QATeam/DevelopmentTools|set up Bzr and Launchpad correctly]].

Working with Bzr branches and Launchpad

This tutorial expects you to have set up Bzr and Launchpad correctly.

Cloning a branch

To clone a branch from Launchpad, you will need to issue the bzr branch command with the branch location as the second parameter. You can find this branch location from the branch overFor example, to clone the manual tests branch, run:

  bzr branch lp:ubuntu-manual-tests

This will clone the ubuntu-manual-tests branch to the current directory as a subdirectory with the branch name. If you want a different directory name, you can append the directory name you wish as the third parameter for the bzr command.

You can get the branch command/name for any branch from its overview page in Launchpad. For example, for the manual tests this would be https://code.launchpad.net/ubuntu-manual-tests.

Pushing a branch

Once you are done with your changes on the branch, you will need to push the branch to Launchpad in order to do a merge proposal.

Until you have the permissions to push to the main branch, you will need to push the branch as a personal branch. Additionally, in order to be able to do a merge proposal, the branch needs to start with the project name. For example, to push a branch for a merge proposal against the ubuntu-manual-tests main branch, run:

  bzr push lp:~yourusername/ubuntu-manual-tests/mychanges

As a quick breakdown, the branch name consists of three different parts:

  • lp:~yourusername/, which means you will be pushing into a personal repository for yourusername

  • ubuntu-manual-tests/, implying that this branch is an alternative/branched branch of the project ubuntu-manual-tests

  • mychanges, which is the actual branch name for this branch

Registering a merge proposal

After you have pushed your changes successfully to a personal branch, you will need to register a merge proposal for your branch in order to let the main branch maintainers know what you have done and to ask for a review from them.

To do this, go to the overview page of your page in Launchpad. If your push location was lp:~yourusername/ubuntu-manual-tests/mychanges, then your branch overview page will be https://code.launchpad.net/~yourusername/ubuntu-manual-tests/mychanges.

You can always find the list of all your personal branches for all projects at https://code.launchpad.net/~/.

On that page, click on Propose for merging under Branch merges. Launchpad will now show you a merge proposal form.

  • The target branch is always the main branch by default, and it is also is in most cases what you want to use.

  • The description is a brief description of your changes, to complement the diff of your merge proposal that the reviewer will be looking at.

  • Finally, reviewer is the person that you ask to review your branch. You do not need to use this unless somebody has asked you to mark them as the reviewer for the branch; in that case, fill in their Launchpad username to this field.

Once you have filled the above information, click Propose merge. This will automatically send a notification to the default reviewers (or the reviewer you specifically filled in).

If your branch looks good to them, the reviewer(s) will approve and merge the branch to the main branch. If there are problems with your branch, the reviewer(s) will comment on the merge proposal and tell you what you need to do before they will approve the branch. You will get an automatical notification in both cases.

QATeam/DevelopmentToolsUsage (last edited 2015-02-11 20:44:34 by host217-44-229-128)