mirror of https://github.com/golang/go.git
doc: Revise Contribution Guidelines.
Smooth out the setup process for new contributors. * Remove references $GOROOT (often not defined). * Add a note for contributing to subrepositories. * Emphasize that hg mail also uploads the latest copy. LGTM=adg R=golang-codereviews, iant, adg CC=golang-codereviews https://golang.org/cl/74370043
This commit is contained in:
parent
e3609ca672
commit
d5f208c874
|
|
@ -45,10 +45,14 @@ tree to make sure the changes don't break other packages or programs:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
cd $GOROOT/src
|
$ cd go/src
|
||||||
./all.bash # On Windows, run all.bat
|
$ ./all.bash
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
(To build under Windows use <code>all.bat</code>.)
|
||||||
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
After running for a while, the command should print "<code>ALL TESTS PASSED</code>".
|
After running for a while, the command should print "<code>ALL TESTS PASSED</code>".
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -95,11 +99,11 @@ command.
|
||||||
|
|
||||||
<h3>Configure the extension</h3>
|
<h3>Configure the extension</h3>
|
||||||
|
|
||||||
<p>Edit <code>$GOROOT/.hg/hgrc</code> to add:</p>
|
<p>Edit <code>.hg/hgrc</code> in the root of your Go checkout to add:</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
[extensions]
|
[extensions]
|
||||||
codereview = $GOROOT/lib/codereview/codereview.py
|
codereview = /path/to/go/lib/codereview/codereview.py
|
||||||
|
|
||||||
[ui]
|
[ui]
|
||||||
username = Your Name <you@server.dom>
|
username = Your Name <you@server.dom>
|
||||||
|
|
@ -110,6 +114,16 @@ The <code>username</code> information will not be used unless
|
||||||
you are a committer (see below), but Mercurial complains if it is missing.
|
you are a committer (see below), but Mercurial complains if it is missing.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
As the codereview extension is only enabled for your Go checkout, the remainder of this document assumes you
|
||||||
|
are inside the go directory when issuing commands.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>To contribute to subrepositories, edit the <code>.hg/hgrc</code> for each
|
||||||
|
subrepository in the same way. For example, add the codereview extension to
|
||||||
|
<code>code.google.com/p/go.tools/.hg/hgrc</code>.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h3>Understanding the extension</h3>
|
<h3>Understanding the extension</h3>
|
||||||
|
|
||||||
<p>After adding the code review extension, you can run</p>
|
<p>After adding the code review extension, you can run</p>
|
||||||
|
|
@ -126,15 +140,9 @@ $ hg help change
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
As the codereview extension is only enabled for your checkout
|
Windows users may need to perform extra steps to get the code review
|
||||||
in <code>$GOROOT</code>, the remainder of this document assumes you
|
|
||||||
are inside <code>$GOROOT</code> when issuing commands.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Windows users may need to perform extra steps to get the code review
|
|
||||||
extension working. See the
|
extension working. See the
|
||||||
<a href="https://code.google.com/p/go-wiki/wiki/CodeReview">CodeReview page</a>
|
<a href="https://code.google.com/p/go-wiki/wiki/CodeReview">CodeReview page</a>
|
||||||
on the <a href="https://code.google.com/p/go-wiki/wiki">Go Wiki</a> for details.
|
on the <a href="https://code.google.com/p/go-wiki/wiki">Go Wiki</a> for details.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
@ -155,7 +163,6 @@ application-specific password and use that when prompted for a password.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
$ cd $GOROOT
|
|
||||||
$ hg code-login
|
$ hg code-login
|
||||||
Email (login for uploading to codereview.appspot.com): rsc@golang.org
|
Email (login for uploading to codereview.appspot.com): rsc@golang.org
|
||||||
Password for rsc@golang.org:
|
Password for rsc@golang.org:
|
||||||
|
|
@ -473,10 +480,19 @@ to send comments back.
|
||||||
<h3>Revise and upload</h3>
|
<h3>Revise and upload</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
You will probably revise your code in response to the reviewer comments. When
|
When you have revised the code and are ready for another round of review,
|
||||||
you have done this, you can upload your change to the code review server
|
you can upload your change and send mail asking the reviewers to
|
||||||
without sending a notification by running <code>hg upload</code> using the change
|
please take another look (<code>PTAL</code>). Use the change list number
|
||||||
list number assigned during <code>hg change</code>
|
assigned during <code>hg change</code>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
$ hg mail 99999
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Or to upload your change without sending a notification, run
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
|
|
@ -484,20 +500,13 @@ $ hg upload 99999
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
When you have revised the code and are ready for another round of review, run
|
You will probably revise your code in response to the reviewer comments.
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
$ hg mail 99999
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>again to upload the latest copy and send mail asking the reviewers to please take another look
|
|
||||||
(<code>PTAL</code>).
|
|
||||||
You might also visit the code review web page and reply to the comments,
|
You might also visit the code review web page and reply to the comments,
|
||||||
letting the reviewer know that you've addressed them or explain why you
|
letting the reviewer know that you've addressed them or explain why you
|
||||||
haven't. When you're done replying, click “Publish and Mail comments”
|
haven't. When you're done replying, click “Publish and Mail comments”
|
||||||
to send the line-by-line replies and any other comments.
|
to send the line-by-line replies and any other comments.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The reviewer can comment on the new copy, and the process repeats.
|
The reviewer can comment on the new copy, and the process repeats.
|
||||||
The reviewer approves the change by replying with a mail that says
|
The reviewer approves the change by replying with a mail that says
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue