diff --git a/doc/contribute.html b/doc/contribute.html index 633d1b1e4a9..92190ca37c6 100644 --- a/doc/contribute.html +++ b/doc/contribute.html @@ -173,24 +173,51 @@ Once your new code is tested and working, it's time to get it reviewed and submitted.

-

Installing the code review extension

+

Code review

Changes to Go must be reviewed before they are submitted, no matter who makes the change. +(In exceptional cases, such as fixing a build, the review can +follow shortly after submitting.) A Mercurial extension helps manage the code review process. The extension is included in the Go source tree but needs to be added to your Mercurial configuration.

+

Caveat for Mercurial aficionados

+

Using Mercurial with the code review extension is not the same -as using it normally. +as using standard Mercurial.

-TODO(rsc): note here about model being different. -Do not use hg commit if you are using the Mercurial extension. +The Go repository is maintained as a single line of reviewed changes; +we prefer to avoid the complexity of Mercurial's arbitrary change graph. +The code review extension helps here: its hg submit command +automatically checks for and warns about the local repository +being out of date compared to the remote one. +The hg submit command also verifies other +properties about the Go repository. +For example, +it checks that Go code being checked in is formatted in the standard style, +as defined by gofmt, +and it checks that the author of the code is properly recorded for +copyright purposes. +

+ +

+To help ensure changes are only created by hg submit, +the code review extension disables the standard hg commit +command. +

+ +

+Mercurial power users: To allow Go contributors to take advantage of +Mercurial's functionality for local revision control, it might be interesting +to explore how the code review extension can be made to work alongside +the Mercurial Queues extension.

Configure the extension

@@ -232,7 +259,7 @@ Saving authentication cookies to /Users/rsc/.codereview_upload_cookies_coderevie

Edit your code review settings. Grab a nickname. -Many people refer to set the Context option to +Many people prefer to set the Context option to “Whole file” to see more context when reviewing changes.

@@ -241,7 +268,7 @@ can use that nickname as a shorthand for naming reviewers and the CC list. For example, rsc is an alias for rsc@golang.org.

-

Changing code

+

Make a change

The entire checked-out tree is writable. @@ -255,8 +282,6 @@ or hg mv.

-

Create a change

-

When you are ready to send a change out for review, run