LEFT | RIGHT |
(no file at all) | |
1 <!--{ | 1 <!--{ |
2 "Title": "Contribution Guidelines" | 2 "Title": "Contribution Guidelines" |
3 }--> | 3 }--> |
4 | 4 |
5 <h2 id="Introduction">Introduction</h2> | 5 <h2 id="Introduction">Introduction</h2> |
6 | 6 |
7 <p> | 7 <p> |
8 This document explains how to contribute changes to the Go project. | 8 This document explains how to contribute changes to the Go project. |
9 It assumes you have installed Go using the | 9 It assumes you have installed Go using the |
10 <a href="/doc/install/source">installation instructions</a> and | 10 <a href="/doc/install/source">installation instructions</a> and |
(...skipping 28 matching lines...) Expand all Loading... |
39 <h2 id="Testing">Testing redux</h2> | 39 <h2 id="Testing">Testing redux</h2> |
40 | 40 |
41 <p> | 41 <p> |
42 You've <a href="code.html">written and tested your code</a>, but | 42 You've <a href="code.html">written and tested your code</a>, but |
43 before sending code out for review, run all the tests for the whole | 43 before sending code out for review, run all the tests for the whole |
44 tree to make sure the changes don't break other packages or programs: | 44 tree to make sure the changes don't break other packages or programs: |
45 </p> | 45 </p> |
46 | 46 |
47 <pre> | 47 <pre> |
48 cd $GOROOT/src | 48 cd $GOROOT/src |
49 ./all.bash | 49 ./all.bash # On Windows, run all.bat |
50 </pre> | 50 </pre> |
51 | 51 |
52 <p> | 52 <p> |
53 The final line printed by <code>make all</code> should be of the form: | 53 After running for a while, the command should print "<code>ALL TESTS PASSED</cod
e>". |
54 </p> | 54 </p> |
55 | |
56 <pre> | |
57 <i>N</i> known bugs; 0 unexpected bugs | |
58 </pre> | |
59 | |
60 <p> | |
61 The value of <i>N</i> varies over time, but the line must | |
62 say “<code>0 unexpected bugs</code>” and must not | |
63 add “<code>test output differs</code>.” | |
64 </p> | |
65 | |
66 | 55 |
67 <h2 id="Code_review">Code review</h2> | 56 <h2 id="Code_review">Code review</h2> |
68 | 57 |
69 <p> | 58 <p> |
70 Changes to Go must be reviewed before they are submitted, | 59 Changes to Go must be reviewed before they are submitted, |
71 no matter who makes the change. | 60 no matter who makes the change. |
72 (In exceptional cases, such as fixing a build, the review can | 61 (In exceptional cases, such as fixing a build, the review can |
73 follow shortly after submitting.) | 62 follow shortly after submitting.) |
74 A Mercurial extension helps manage the code review process. | 63 A Mercurial extension helps manage the code review process. |
75 The extension is included in the Go source tree but needs | 64 The extension is included in the Go source tree but needs |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 <p> | 115 <p> |
127 The code review server uses a Google Account to authenticate. | 116 The code review server uses a Google Account to authenticate. |
128 (If you can use the account to | 117 (If you can use the account to |
129 <a href="https://www.google.com/accounts/Login?hl=en&continue=http://www.goo
gle.com/">sign in at google.com</a>, | 118 <a href="https://www.google.com/accounts/Login?hl=en&continue=http://www.goo
gle.com/">sign in at google.com</a>, |
130 you can use it to sign in to the code review server. | 119 you can use it to sign in to the code review server. |
131 The email address you use on the Code Review site | 120 The email address you use on the Code Review site |
132 will be recorded in the <a href="http://code.google.com/p/go/source/list">Mercur
ial change log</a> | 121 will be recorded in the <a href="http://code.google.com/p/go/source/list">Mercur
ial change log</a> |
133 and in the <a href="/CONTRIBUTORS"><code>CONTRIBUTORS</code></a> file. | 122 and in the <a href="/CONTRIBUTORS"><code>CONTRIBUTORS</code></a> file. |
134 You can <a href="https://www.google.com/accounts/NewAccount">create a Google Acc
ount</a> | 123 You can <a href="https://www.google.com/accounts/NewAccount">create a Google Acc
ount</a> |
135 associated with any address where you receive email. | 124 associated with any address where you receive email. |
| 125 If you've enabled the two-step verification feature, don't forget to generate an |
| 126 application-specific password and use that when prompted for a password. |
136 </p> | 127 </p> |
137 | 128 |
138 <pre> | 129 <pre> |
139 $ cd $GOROOT | 130 $ cd $GOROOT |
140 $ hg code-login | 131 $ hg code-login |
141 Email (login for uploading to codereview.appspot.com): rsc@golang.org | 132 Email (login for uploading to codereview.appspot.com): rsc@golang.org |
142 Password for rsc@golang.org: | 133 Password for rsc@golang.org: |
143 | 134 |
144 Saving authentication cookies to /Users/rsc/.codereview_upload_cookies_coderevie
w.appspot.com | 135 Saving authentication cookies to /Users/rsc/.codereview_upload_cookies_coderevie
w.appspot.com |
145 </pre> | 136 </pre> |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 <p> | 269 <p> |
279 The code review server assigns your change an issue number and URL, | 270 The code review server assigns your change an issue number and URL, |
280 which <code>hg change</code> will print, something like: | 271 which <code>hg change</code> will print, something like: |
281 </p> | 272 </p> |
282 | 273 |
283 <pre> | 274 <pre> |
284 CL created: http://codereview.appspot.com/99999 | 275 CL created: http://codereview.appspot.com/99999 |
285 </pre> | 276 </pre> |
286 | 277 |
287 <p> | 278 <p> |
288 If you need to re-edit the change description, | 279 If you need to re-edit the change description, or change the files included in t
he CL, |
289 run <code>hg change 99999</code>. | 280 run <code>hg change 99999</code>. Alternatively, you can use <code>hg file 99999
somefile</code> |
| 281 to add <code>somefile</code> to CL 99999, and use <code>hg file -d 99999 somefil
e</code> to remove |
| 282 <code>somefile</code> from the CL. |
290 </p> | 283 </p> |
291 | 284 |
292 <p> | 285 <p> |
293 You can see a list of your pending changes by running <code>hg pending</code> (<
code>hg p</code> for short). | 286 You can see a list of your pending changes by running <code>hg pending</code> (<
code>hg p</code> for short). |
294 </p> | 287 </p> |
295 | 288 |
296 | 289 |
297 <h3>Synchronize your client</h3> | 290 <h3>Synchronize your client</h3> |
298 | 291 |
299 <p>While you were working, others might have submitted changes | 292 <p>While you were working, others might have submitted changes |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 This rigmarole needs to be done only for your first submission. | 522 This rigmarole needs to be done only for your first submission. |
530 </p> | 523 </p> |
531 | 524 |
532 <p>Code that you contribute should use the standard copyright header:</p> | 525 <p>Code that you contribute should use the standard copyright header:</p> |
533 | 526 |
534 <pre> | 527 <pre> |
535 // Copyright 2012 The Go Authors. All rights reserved. | 528 // Copyright 2012 The Go Authors. All rights reserved. |
536 // Use of this source code is governed by a BSD-style | 529 // Use of this source code is governed by a BSD-style |
537 // license that can be found in the LICENSE file. | 530 // license that can be found in the LICENSE file. |
538 </pre> | 531 </pre> |
LEFT | RIGHT |