Diff for "Code/Review"

Not logged in - Log In / Register

Differences between revisions 2 and 4 (spanning 2 versions)
Revision 2 as of 2008-09-11 13:11:31
Size: 3394
Editor: 92-237-59-186
Comment:
Revision 4 as of 2008-09-12 15:01:35
Size: 3733
Editor: 92-237-59-186
Comment:
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
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 11:
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 are hassle-free. Launchpad helps look after the community process of discussing whether a proposed merge is a good idea.
Line 17: 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'''||

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.
Line 18: Line 31:
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 19: Line 33:
As a subscriber to or participant in the conversation, you'll receive email updates as the code progresses. 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 20: Line 35:
if you want to spend some time working on a feature without 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 22: Line 37:
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 23: Line 39:
With Bazaar, each developer working on a project can one or more branches of the project's code. Many developers choose to work on a specific branch have their own branch where they work == Email interface ==
Line 25: Line 41:
Use the first two paragraphs to summarise all the important points about this article. 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 27: Line 43:
Tell the reader if this is the information they need as soon as possible.  * vote approve
 * vote disapprove
 * vote abstain
Line 29: Line 47:
= Instructional text = So, if you wanted to vote ''diapprove'', add a tag of ''UI'' and also leave a comment, you'd write:
Line 31: Line 49:
Where appropriate, use step by step instructions: {{{
This is a sensisble change but I find the user interface confusing.
Line 33: Line 52:
'''Step 1:''' Give concise and unambiguous instructions.  vote disapprove UI
}}}
Line 35: Line 55:
'''Step 2:''' Try not to state the obvious, unless you're writing for a novice user.

{i} '''Note:''' Highlight important information with a note.

'''Step 3:''' Use a well cropped screen shot if it will help orient the reader. Don't let the screen shot replace instructional text: not everyone can see your screen shot. Don't worry about borders or annotation for small, cropped screen shots such as this.

{{attachment:screen-shot.png}}

{i} '''Warning:''' If you're about to tell the reader to delete or otherwise change something that would be hard to restore, warn them.


== Full screen shots ==

||<tablestyle="float:right; font-size: 0.8em; width:30%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;">{{attachment:proj-announce.png}}||
||<style="text-align: center;">'''Describe the screen shot here'''||

Some screen shots will be better placed to the right of your text. As they're not placed directly below the text that they support, use a border and short description.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam sagittis. Aliquam eros dui, scelerisque id, consequat in, accumsan vitae, pede. Suspendisse neque ligula, scelerisque ac, mattis ut, aliquam quis, odio.

Proin nunc nisi, fringilla ac, congue ac, luctus eu, lacus. Maecenas ac purus. Cras felis metus, ultricies non, euismod ac, accumsan eleifend, leo. Quisque imperdiet tempus tellus.

Ut euismod, diam nec adipiscing interdum, tortor orci fringilla nisi, vel blandit erat magna at nisi. Fusce hendrerit odio non metus. Mauris nisl massa, dapibus id, feugiat quis, blandit a, quam. Integer tincidunt feugiat nunc. Curabitur iaculis egestas elit. Nam imperdiet suscipit odio.
= Next step =

DRAFT: this page is a work in progress. Please seek further help or check the wiki index for a complete page on this topic.

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 are hassle-free. 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 or participant in the conversation, you'll receive email updates as the code progresses. 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 diapprove, 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

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