From 8a39ee361feb9bf46d728ff1ba4f07ca1d9610b1 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 19 Jun 2014 09:22:53 +0200 Subject: Imported Upstream version 1.3 --- doc/contribute.html | 92 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 55 insertions(+), 37 deletions(-) (limited to 'doc/contribute.html') 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.

Before undertaking to write something new for the Go project, send -mail to the mailing +mail to the mailing list 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,10 +45,14 @@ tree to make sure the changes don't break other packages or programs:

-cd $GOROOT/src
-./all.bash    # On Windows, run all.bat
+$ cd go/src
+$ ./all.bash
 
+

+(To build under Windows use all.bat.) +

+

After running for a while, the command should print "ALL TESTS PASSED".

@@ -95,11 +99,11 @@ command.

Configure the extension

-

Edit $GOROOT/.hg/hgrc to add:

+

Edit .hg/hgrc in the root of your Go checkout to add:

 [extensions]
-codereview = $GOROOT/lib/codereview/codereview.py
+codereview = /path/to/go/lib/codereview/codereview.py
 
 [ui]
 username = Your Name <you@server.dom>
@@ -110,6 +114,16 @@ The username information will not be used unless
 you are a committer (see below), but Mercurial complains if it is missing.
 

+

+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. +

+ +

To contribute to subrepositories, edit the .hg/hgrc for each +subrepository in the same way. For example, add the codereview extension to +code.google.com/p/go.tools/.hg/hgrc. +

+

Understanding the extension

After adding the code review extension, you can run

@@ -126,16 +140,10 @@ $ hg help change

-As the codereview extension is only enabled for your checkout -in $GOROOT, the remainder of this document assumes you -are inside $GOROOT when issuing commands. -

- -

-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 -CodeReview page -on the Go Wiki for details. +CodeReview page +on the Go Wiki for details.

Log in to the code review site.

@@ -146,7 +154,7 @@ The code review server uses a Google Account to authenticate. sign in at google.com, 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 Mercurial change log +will be recorded in the Mercurial change log and in the CONTRIBUTORS file. You can create a Google Account associated with any address where you receive email. @@ -155,7 +163,6 @@ application-specific password and use that when prompted for a password.

-$ 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
 
 

Configure your account settings.

-

Edit your code review settings. +

Edit your code review settings. Grab a nickname. Many people prefer to set the Context option to “Whole file” 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 -golang-dev@googlegroups.com +golang-codereviews@googlegroups.com mailing list will be used as the reviewer.

@@ -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:

The special sentence “Fixes issue 159.” associates -the change with issue 159 in the Go issue tracker. +the change with issue 159 in the Go issue tracker. When this change is eventually submitted, the issue tracker will automatically mark the issue as fixed. (These conventions are described in detail by the -Google Project Hosting Issue Tracker documentation.) +Google Project Hosting Issue Tracker documentation.)

@@ -302,7 +309,7 @@ which hg change will print, something like:

-CL created: http://codereview.appspot.com/99999
+CL created: https://codereview.appspot.com/99999
 

Adding or removing files from an existing change

@@ -448,7 +455,7 @@ lines blank and then run:

-$ 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
 

to achieve the same effect.

@@ -473,31 +480,33 @@ to send comments back.

Revise and upload

-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 hg upload using the change -list number assigned during hg change +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 (PTAL). Use the change list number +assigned during hg change

-$ hg upload 99999
+$ hg mail 99999
 
+

-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

-$ hg mail 99999
+$ hg upload 99999
 
-

again to upload the latest copy and send mail asking the reviewers to please take another look -(PTAL). +

+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 “Publish and Mail comments” to send the line-by-line replies and any other comments.

+

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

+

More information

+ +

+In addition to the information here, the Go community maintains a CodeReview wiki page. +Feel free to contribute to this page as you learn the review process. +

+

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 Mercurial change log +Instead, your name will appear in the Mercurial change log and in the CONTRIBUTORS file and perhaps the AUTHORS file.

@@ -616,13 +632,15 @@ In order for them to do that, you need to have completed one of the contributor license agreements: