From 9ad14c94db182dd3326e4c80053e0311f47700ce Mon Sep 17 00:00:00 2001
From: Russ Cox
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.
+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.
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
.
-
The entire checked-out tree is writable.
@@ -255,8 +282,6 @@ or
hg mv
.
When you are ready to send a change out for review, run