summaryrefslogtreecommitdiff
path: root/doc/contribute.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/contribute.html')
-rw-r--r--doc/contribute.html92
1 files changed, 55 insertions, 37 deletions
diff --git a/doc/contribute.html b/doc/contribute.html
index 716a1849e..392734985 100644
--- a/doc/contribute.html
+++ b/doc/contribute.html
@@ -22,7 +22,7 @@ you're working on if you want it to become part of the main repository.
<p>
Before undertaking to write something new for the Go project, send
-mail to the <a href="http://groups.google.com/group/golang-nuts">mailing
+mail to the <a href="https://groups.google.com/group/golang-nuts">mailing
list</a> to discuss what you plan to do. This gives everyone a
chance to validate the design, helps prevent duplication of effort,
and ensures that the idea fits inside the goals for the language
@@ -45,11 +45,15 @@ tree to make sure the changes don't break other packages or programs:
</p>
<pre>
-cd $GOROOT/src
-./all.bash # On Windows, run all.bat
+$ cd go/src
+$ ./all.bash
</pre>
<p>
+(To build under Windows use <code>all.bat</code>.)
+</p>
+
+<p>
After running for a while, the command should print "<code>ALL TESTS PASSED</code>".
</p>
@@ -95,11 +99,11 @@ command.
<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>
[extensions]
-codereview = $GOROOT/lib/codereview/codereview.py
+codereview = /path/to/go/lib/codereview/codereview.py
[ui]
username = Your Name &lt;you@server.dom&gt;
@@ -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.
</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>
<p>After adding the code review extension, you can run</p>
@@ -126,16 +140,10 @@ $ hg help change
</pre>
<p>
-As the codereview extension is only enabled for your checkout
-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
+Windows users may need to perform extra steps to get the code review
extension working. See the
-<a href="https://code.google.com/p/go-wiki/wiki/CodeReview">CodeReview page</a>
-on the <a href="http://code.google.com/p/go-wiki/wiki">Go Wiki</a> for details.
+<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.
</p>
<h3>Log in to the code review site.</h3>
@@ -146,7 +154,7 @@ The code review server uses a Google Account to authenticate.
<a href="https://www.google.com/accounts/Login?hl=en&amp;continue=http://www.google.com/">sign in at google.com</a>,
you can use it to sign in to the code review server.)
The email address you use on the Code Review site
-will be recorded in the <a href="http://code.google.com/p/go/source/list">Mercurial change log</a>
+will be recorded in the <a href="https://code.google.com/p/go/source/list">Mercurial change log</a>
and in the <a href="/CONTRIBUTORS"><code>CONTRIBUTORS</code></a> file.
You can <a href="https://www.google.com/accounts/NewAccount">create a Google Account</a>
associated with any address where you receive email.
@@ -155,7 +163,6 @@ application-specific password and use that when prompted for a password.
</p>
<pre>
-$ cd $GOROOT
$ hg code-login
Email (login for uploading to codereview.appspot.com): rsc@golang.org
Password for rsc@golang.org:
@@ -165,7 +172,7 @@ Saving authentication cookies to /Users/rsc/.codereview_upload_cookies_coderevie
<h3>Configure your account settings.</h3>
-<p>Edit your <a href="http://codereview.appspot.com/settings">code review settings</a>.
+<p>Edit your <a href="https://codereview.appspot.com/settings">code review settings</a>.
Grab a nickname.
Many people prefer to set the Context option to
&ldquo;Whole file&rdquo; to see more context when reviewing changes.
@@ -240,7 +247,7 @@ These can be code review nicknames or arbitrary email addresses.
Unless explicitly told otherwise, such as in the discussion leading
up to sending in the change list, leave the reviewer field blank.
This means that the
-<a href="http://groups.google.com/group/golang-dev">golang-dev@googlegroups.com</a>
+<a href="https://groups.google.com/group/golang-codereviews">golang-codereviews@googlegroups.com</a>
mailing list will be used as the reviewer.
</p>
@@ -270,7 +277,7 @@ After editing, the template might now read:
# Lines beginning with # are ignored.
# Multi-line values should be indented.
-Reviewer: golang-dev@googlegroups.com
+Reviewer: golang-codereviews@googlegroups.com
CC: math-nuts@swtch.com
Description:
@@ -286,11 +293,11 @@ Files:
<p>
The special sentence &ldquo;Fixes issue 159.&rdquo; associates
-the change with issue 159 in the <a href="http://code.google.com/p/go/issues/list">Go issue tracker</a>.
+the change with issue 159 in the <a href="https://code.google.com/p/go/issues/list">Go issue tracker</a>.
When this change is eventually submitted, the issue
tracker will automatically mark the issue as fixed.
(These conventions are described in detail by the
-<a href="http://code.google.com/p/support/wiki/IssueTracker#Integration_with_version_control">Google Project Hosting Issue Tracker documentation</a>.)
+<a href="https://code.google.com/p/support/wiki/IssueTracker#Integration_with_version_control">Google Project Hosting Issue Tracker documentation</a>.)
</p>
<p>
@@ -302,7 +309,7 @@ which <code>hg change</code> will print, something like:
</p>
<pre>
-CL created: http://codereview.appspot.com/99999
+CL created: https://codereview.appspot.com/99999
</pre>
<h3>Adding or removing files from an existing change</h3>
@@ -448,7 +455,7 @@ lines blank and then run:
</p>
<pre>
-$ hg mail -r golang-dev@googlegroups.com --cc math-nuts@swtch.com 99999
+$ hg mail -r golang-codereviews@googlegroups.com --cc math-nuts@swtch.com 99999
</pre>
<p>to achieve the same effect.</p>
@@ -473,31 +480,33 @@ to send comments back.
<h3>Revise and upload</h3>
<p>
-You will probably revise your code in response to the reviewer comments. When
-you have done this, you can upload your change to the code review server
-without sending a notification by running <code>hg upload</code> using the change
-list number assigned during <code>hg change</code>
+When you have revised the code and are ready for another round of review,
+you can upload your change and send mail asking the reviewers to
+please take another look (<code>PTAL</code>). Use the change list number
+assigned during <code>hg change</code>
</p>
<pre>
-$ hg upload 99999
+$ hg mail 99999
</pre>
+
<p>
-When you have revised the code and are ready for another round of review, run
+Or to upload your change without sending a notification, run
</p>
<pre>
-$ hg mail 99999
+$ hg upload 99999
</pre>
-<p>again to upload the latest copy and send mail asking the reviewers to please take another look
-(<code>PTAL</code>).
+<p>
+You will probably revise your code in response to the reviewer 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
haven't. When you're done replying, click &ldquo;Publish and Mail comments&rdquo;
to send the line-by-line replies and any other comments.
</p>
+
<p>
The reviewer can comment on the new copy, and the process repeats.
The reviewer approves the change by replying with a mail that says
@@ -597,11 +606,18 @@ $ hg submit 99999
local repository out of date; must sync before submit
</pre>
+<h3>More information</h3>
+
+<p>
+In addition to the information here, the Go community maintains a <a href="https://code.google.com/p/go-wiki/wiki/CodeReview">CodeReview</a> wiki page.
+Feel free to contribute to this page as you learn the review process.
+</p>
+
<h2 id="copyright">Copyright</h2>
<p>Files in the Go repository don't list author names,
both to avoid clutter and to avoid having to keep the lists up to date.
-Instead, your name will appear in the <a href="http://code.google.com/p/go/source/list">Mercurial change log</a>
+Instead, your name will appear in the <a href="https://code.google.com/p/go/source/list">Mercurial change log</a>
and in the <a href="/CONTRIBUTORS"><code>CONTRIBUTORS</code></a> file
and perhaps the <a href="/AUTHORS"><code>AUTHORS</code></a> file.
</p>
@@ -616,13 +632,15 @@ In order for them to do that, you need to have completed one of the
contributor license agreements:
<ul>
<li>
-If you are the copyright holder, you will need to agree to
-the <a href="http://code.google.com/legal/individual-cla-v1.0.html">individual
+If you are the copyright holder, you will need to agree to the
+<a href="https://developers.google.com/open-source/cla/individual">individual
contributor license agreement</a>, which can be completed online.
</li>
<li>
If your organization is the copyright holder, the organization
-will need to agree to the <a href="http://code.google.com/legal/corporate-cla-v1.0.html">corporate contributor license agreement</a>.
+will need to agree to the
+<a href="https://developers.google.com/open-source/cla/corporate">corporate
+contributor license agreement</a>.
(If the copyright holder for your code has already completed the
agreement in connection with another Google open source project,
it does not need to be completed again.)
@@ -636,7 +654,7 @@ This rigmarole needs to be done only for your first submission.
<p>Code that you contribute should use the standard copyright header:</p>
<pre>
-// Copyright 2013 The Go Authors. All rights reserved.
+// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
</pre>