blob: 4610c950a47fcac45937c7a5f83f884bd489ace1 [file] [log] [blame]
Brian Silvermane4452c72013-04-14 22:23:50 -07001This file has some general information about how 971 does code reviews.
2
3We use Rietveld (<https://code.google.com/p/rietveld>) running in an app engine
4 app of ours. It is at <http://971code.appspot.com/>.
5
6[General Procedure]
7We try to code review all code before it gets checked in to svn. Code reviews
8 are also sometimes useful for getting feedback about documentation etc.
9First, somebody starts a code review and sends out emails to people asking them
10 to look. Then, other people look at it and make suggestions (in the form of
11 comments). The person who started the review (the owner of it) looks at the
12 comments and responds to them and/or changes their code and uploads new
13 versions for everybody to look at. Once all of the reviewers approve the code,
14 the owner checks it in and closes the code review (issue).
15
16[Reviewing]
17This is the section for people who have received emails about reviewing code
18 should look.
19The email that you receive will have a link to the issue (like
20 <http://971code.appspot.com/82001/>). Click on it to go to the issue page.
21 The most useful form of diff are the "Side-by-side diffs". Click the "View"
22 link in that column next to each file to look at it. After the first set of
23 comments, the "Delta from patch set" links are also helpful to see what got
Brian Silverman43c3ef22014-01-03 13:34:03 -080024 changed so that you don't have to look at everything again. While looking at
Brian Silvermane4452c72013-04-14 22:23:50 -070025 a diff, double-click on any line of code to leave a comment there. You can
Brian Silverman43c3ef22014-01-03 13:34:03 -080026 also reply to existing comments. The web interface sometimes hides comments
Brian Silvermane4452c72013-04-14 22:23:50 -070027 right after you create/edit them. Refresh the page to fix that (don't just do
28 it again, or you'll end up with 2 identical comments). Once you are done
29 looking at all of the files and making comments, click the
30 "Publish+Mail Comments" link (at the top of each diff or on the left of the
31 main issue page) to send out your comments. You can also put general notes in
Brian Silverman43c3ef22014-01-03 13:34:03 -080032 the "Message" box. If you think that it looks good, then put "LGTM" at the top
33 of the message. The owner of the code review will keep looking at your
Brian Silvermane4452c72013-04-14 22:23:50 -070034 comments, making changes, and sending out more messages until it's finished.
35
Brian Silverman43c3ef22014-01-03 13:34:03 -080036[Starting a Review]
37To begin, log in to <http://971code.appspot.com/> then click the "Create Issue"
38 link. Download the "upload.py" script and use that, not the web form, for
39 uploading a diff. (The web form has too many problems and is unusable with
40 git.) The script will find svn, git, or hg diffs in your current directory. If
41 you want the diff to cover back to an earlier change number, use the --rev
42 arg.
43
44 You don't need to give it a -s (--server) arg since the right default server
45 address is in the script. You can give it a -e (--email) arg with your gmail
46 address or let it ask you. (If you use 2-factor login for gmail, which I
47 recommend, you'll need to create an application-specific password instead of
48 using your regular password + OTP code.)
49
50 After it uploads, you can review the diffs on the web page. You can change
51 code and upload another diff. When ready, use the web UI to send the code
52 review email. Don't delete the old diffs; they are helpful for reviewers to
53 figure out what changed.
Brian Silvermane4452c72013-04-14 22:23:50 -070054
55For more information about using Rietveld, see
56 <https://code.google.com/p/rietveld/wiki/CodeReviewHelp>.