Diff for "Code/Review"

Not logged in - Log In / Register

Differences between revisions 3 and 11 (spanning 8 versions)
Revision 3 as of 2008-09-11 17:39:11
Size: 2177
Editor: 92-237-59-186
Comment:
Revision 11 as of 2009-01-08 09:38:03
Size: 4190
Editor: null
Comment: very minor typo
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
'''DRAFT: this page is a work in progress. Please [[Feedback|seek further help]] or check the [[TitleIndex|wiki index]] for a complete page on this topic.''' ## page was renamed from Code/Review/Draft
~-[[FrontPage|Launchpad Help]] > [[Code]] > Code review -~
Line 9: Line 10:
That flexibility means you can start work on a project without having to get special permissions to commit code. Of course, if you make changes that you want to see integrated in the project's main line, you need a way of telling the main line's owner that you want to merge your code back in. That flexibility means you can start work on a project without having to get special permissions to commit code. Of course, if you make changes that you want to see integrated into the project's main line you need a way of telling the main line's owner that you want to merge.
Line 11: Line 12:
Launchpad and Bazaar make that easy. Bazaar was made to merge: even complex merges are hassle-free. Launchpad helps look after the community process around whether a proposed merge is a good idea.

The first step is to make your merge proposal public.
Launchpad and Bazaar make that easy. Bazaar was made to merge: even complex merges can be relatively easy. Launchpad helps look after the community process of discussing whether a proposed merge is a good idea.
Line 16: Line 15:

||<tablestyle="float: right; font-size: 0.8em; width:30%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;">{{attachment:proposed-merges.png}}||
||<style="text-align: center;">'''Proposed merges'''||
Line 21: Line 23:
Now, Launchpad will notify the proposed target branch's owner of your proposal. Your proposal will also show up in the list of ''active reviews'' available from the project's code overview page, meaning your code is now subject to review by anyone and everyone who takes an interest. Now, Launchpad will notify the proposed target branch's owner of your proposal. Anyone viewing the overview page for your branch, or the target branch, will also see a link to view the details of your proposal.
Line 23: Line 25:
= Taking part in code reviews = = Code review =
Line 25: Line 27:
Once someone proposes a merge between branches, Launchpad opens a code review. A code review enables people - anyone with a Launchpad account - to comment and vote on the proposed merge. Once you've proposed a merge, anyone who has a Launchpad account can comment and vote on the proposal. Taking part in a code review is virtually hassle-free:
Line 27: Line 29:
Let's take a look at  * '''no barriers:''' anyone can take part, so long as they have a Launchpad account
 * '''convenient:''' you can get updates and contribute using email, as well as the web interface.
 
Each review consists of votes - approve, abstain or disapprove - and a threaded conversation much as you might find on a web forum or a mailing list. If you're already familiar with [[Bugs|Launchpad Bugs]], you'll be right at home with code reviews.
Line 29: Line 34:
As a subscriber to the branch or a participant in the code review, you'll receive email updates each time someone adds a vote or message to the review. Just as with the bug tracker, you can take part in the review both by visiting Launchpad's web interface and by replying to any of the emails you receive. In effect, each code review becomes an ad-hoc mailing list that exists for the lifetime of the review.
Line 30: Line 36:
You can find all of a project's active reviews by following the link on the project's code overview page. If you want to make your vote specific to one aspect of the proposed merge, you can add a tag. For example: if you wanted to vote disapprove, based on the user interface, you could add a tag of ''ui''.
Line 32: Line 38:
For an example of a review, take a look at a [[https://code.launchpad.net/~therve/storm/binary-and/+merge/387|code review in the Storm project]].
Line 33: Line 40:
== Email interface ==
Line 34: Line 42:
Using the code review email interface is straightforward. Reply to an email from the code review and your comment is added to the discussion in Launchpad. If you want to vote by email, leave a space at the start of the line and then one of the following commands:
Line 35: Line 44:
 * vote approve
 * vote disapprove
 * vote abstain
Line 36: Line 48:
So, if you wanted to vote ''disapprove'', add a tag of ''UI'' and also leave a comment, you'd write:
Line 37: Line 50:
{{{
This is a sensisble change but I find the user interface confusing.
Line 38: Line 53:
 vote disapprove UI
}}}
Line 39: Line 56:
back into the project mainline - or you want to merge your code = Next step =

You can pick choose which parts of Launchpad you want to use. However, when you use different parts of Launchpad together you can make them work together. Let's look at how you can [[Code/BugAndBlueprintLinks|link bug report and blueprints to branches of code]].

||<tablestyle="width: 100%;"> ~-[[Code/TeamBranches|< Team branches]] -~ ||<style="text-align: right;"> ~- [[Code/BugAndBlueprintLinks|Linking branches to bug reports and blueprints >]] -~ ||

Launchpad Help > Code > Code review

Overview

Thanks to Bazaar's distributed model, you can get full access to the code of any branch hosted in Launchpad, with version control and history, right on your own machine.

That flexibility means you can start work on a project without having to get special permissions to commit code. Of course, if you make changes that you want to see integrated into the project's main line you need a way of telling the main line's owner that you want to merge.

Launchpad and Bazaar make that easy. Bazaar was made to merge: even complex merges can be relatively easy. Launchpad helps look after the community process of discussing whether a proposed merge is a good idea.

Proposing a merge

proposed-merges.png

Proposed merges

When you've come to a stage in your development where you're ready to merge your code into another branch registered against the project - such as its main line - you can make a public merge proposal.

To do so, visit your branch's overview page, click Propose for merging into another branch, then follow the on-screen instructions.

Now, Launchpad will notify the proposed target branch's owner of your proposal. Anyone viewing the overview page for your branch, or the target branch, will also see a link to view the details of your proposal.

Code review

Once you've proposed a merge, anyone who has a Launchpad account can comment and vote on the proposal. Taking part in a code review is virtually hassle-free:

  • no barriers: anyone can take part, so long as they have a Launchpad account

  • convenient: you can get updates and contribute using email, as well as the web interface.

Each review consists of votes - approve, abstain or disapprove - and a threaded conversation much as you might find on a web forum or a mailing list. If you're already familiar with Launchpad Bugs, you'll be right at home with code reviews.

As a subscriber to the branch or a participant in the code review, you'll receive email updates each time someone adds a vote or message to the review. Just as with the bug tracker, you can take part in the review both by visiting Launchpad's web interface and by replying to any of the emails you receive. In effect, each code review becomes an ad-hoc mailing list that exists for the lifetime of the review.

If you want to make your vote specific to one aspect of the proposed merge, you can add a tag. For example: if you wanted to vote disapprove, based on the user interface, you could add a tag of ui.

For an example of a review, take a look at a code review in the Storm project.

Email interface

Using the code review email interface is straightforward. Reply to an email from the code review and your comment is added to the discussion in Launchpad. If you want to vote by email, leave a space at the start of the line and then one of the following commands:

  • vote approve
  • vote disapprove
  • vote abstain

So, if you wanted to vote disapprove, add a tag of UI and also leave a comment, you'd write:

This is a sensisble change but I find the user interface confusing.

 vote disapprove UI

Next step

You can pick choose which parts of Launchpad you want to use. However, when you use different parts of Launchpad together you can make them work together. Let's look at how you can link bug report and blueprints to branches of code.

< Team branches

Linking branches to bug reports and blueprints >

Code/Review (last edited 2024-03-19 15:10:02 by ruinedyourlife)