Brian Silverman | e4452c7 | 2013-04-14 22:23:50 -0700 | [diff] [blame] | 1 | This file has some general information about how 971 does code reviews. |
| 2 | |
| 3 | We 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] |
| 7 | We 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. |
| 9 | First, 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] |
| 17 | This is the section for people who have received emails about reviewing code |
| 18 | should look. |
| 19 | The 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 Silverman | 43c3ef2 | 2014-01-03 13:34:03 -0800 | [diff] [blame] | 24 | changed so that you don't have to look at everything again. While looking at |
Brian Silverman | e4452c7 | 2013-04-14 22:23:50 -0700 | [diff] [blame] | 25 | a diff, double-click on any line of code to leave a comment there. You can |
Brian Silverman | 43c3ef2 | 2014-01-03 13:34:03 -0800 | [diff] [blame] | 26 | also reply to existing comments. The web interface sometimes hides comments |
Brian Silverman | e4452c7 | 2013-04-14 22:23:50 -0700 | [diff] [blame] | 27 | 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 Silverman | 43c3ef2 | 2014-01-03 13:34:03 -0800 | [diff] [blame] | 32 | 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 Silverman | e4452c7 | 2013-04-14 22:23:50 -0700 | [diff] [blame] | 34 | comments, making changes, and sending out more messages until it's finished. |
| 35 | |
Brian Silverman | 43c3ef2 | 2014-01-03 13:34:03 -0800 | [diff] [blame] | 36 | [Starting a Review] |
| 37 | To 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 Silverman | e4452c7 | 2013-04-14 22:23:50 -0700 | [diff] [blame] | 54 | |
| 55 | For more information about using Rietveld, see |
| 56 | <https://code.google.com/p/rietveld/wiki/CodeReviewHelp>. |