From 4482c7b1a1ad3a7dd31f6b6cd26fcfd2758743d9 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 13 Jan 2015 23:57:27 -0500 Subject: [PATCH] [release-branch.go1.4] doc: copy contribute.html and install-source.html from master This incorporates the various git-related updates that have happened since the Go 1.4 release. Since Go 1.4.1 will be issued from Git, it is appropriate to replace the Mercurial instructions with Git instructions. Change-Id: Idec041002c7f325c4eee6f25c50423b088b11468 Reviewed-on: https://go-review.googlesource.com/2788 Reviewed-by: Andrew Gerrand --- doc/contribute.html | 70 ++++++++++++++++++----------------------- doc/install-source.html | 61 +++++++++++++---------------------- 2 files changed, 53 insertions(+), 78 deletions(-) diff --git a/doc/contribute.html b/doc/contribute.html index ba550d5281..63d477462c 100644 --- a/doc/contribute.html +++ b/doc/contribute.html @@ -6,19 +6,10 @@

This document explains how to contribute changes to the Go project. -It assumes you have installed Go from source: -

- -

-$ git clone https://go.googlesource.com/go
-$ cd go/src
-$ ./all.bash
-
- +

(Note that the gccgo frontend lives elsewhere; @@ -77,7 +68,7 @@ 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 custom git command called git-review, +A custom git command called git-codereview, discussed below, helps manage the code review process through a Google-hosted instance of the code review system called Gerrit. @@ -132,53 +123,53 @@ and log in using the same Google Account you used above. That is all that is required.

-

Install the git-review command

+

Install the git-codereview command

-Now install the git-review command by running, +Now install the git-codereview command by running,

-go get -u golang.org/x/review/git-review
+go get -u golang.org/x/review/git-codereview
 

-Make sure git-review is installed in your shell path, so that the +Make sure git-codereview is installed in your shell path, so that the git command can find it. Check that

-$ git review help
+$ git codereview help
 
- +

prints help text, not an error.

-Note to Git aficionados: The git-review command is not required to +Note to Git aficionados: The git-codereview command is not required to upload and manage Gerrit code reviews. For those who prefer plain Git, the text -below gives the Git equivalent of each git-review command. If you do use plain -Git, note that you still need the commit hooks that the git-review command +below gives the Git equivalent of each git-codereview command. If you do use plain +Git, note that you still need the commit hooks that the git-codereview command configures; those hooks add a Gerrit Change-Id line to the commit message and check that all Go source files have been formatted with gofmt. Even if you intend to use plain Git for daily work, install the hooks in a new Git -checkout by running git-review hooks). +checkout by running git-codereview hooks.

Set up git aliases

-The git-review command can be run directly from the shell +The git-codereview command can be run directly from the shell by typing, for instance,

-$ git review sync
+$ git codereview sync
 

-but it is more convenient to set up aliases for git-review's own +but it is more convenient to set up aliases for git-codereview's own subcommands, so that the above becomes,

@@ -186,8 +177,8 @@ subcommands, so that the above becomes, $ git sync -

-The git-review subcommands have been chosen to be distinct from +

+The git-codereview subcommands have been chosen to be distinct from Git's own, so it's safe to do so.

@@ -200,24 +191,25 @@ To install them, copy this text into your Git configuration file
 [alias]
-	change = review change
-	gofmt = review gofmt
-	mail = review mail
-	pending = review pending
-	sync = review sync
+	change = codereview change
+	gofmt = codereview gofmt
+	mail = codereview mail
+	pending = codereview pending
+	submit = codereview submit
+	sync = codereview sync
 
-

Understanding the git-review command

+

Understanding the git-codereview command

-

After installing the git-review command, you can run

+

After installing the git-codereview command, you can run

-$ git review help
+$ git codereview help
 

to learn more about its commands. -You can also read the command documentation. +You can also read the command documentation.

Switch to the master branch

@@ -367,7 +359,7 @@ Do not edit or delete it.

(In Git terms, git change with no branch name runs git commit --amend.) -

+

Mail the change for review

@@ -469,7 +461,7 @@ $ git sync

-(In git terms, git sync runs +(In git terms, git sync runs git pull -r.)

@@ -660,7 +652,7 @@ This rigmarole needs to be done only for your first submission.

Code that you contribute should use the standard copyright header:

-// Copyright 2014 The Go Authors. All rights reserved.
+// Copyright 2015 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.
 
diff --git a/doc/install-source.html b/doc/install-source.html index f53deb404c..15cb624df2 100644 --- a/doc/install-source.html +++ b/doc/install-source.html @@ -81,38 +81,21 @@ The full set of supported combinations is listed in the discussion of

The Go tool chain is written in C. To build it, you need a C compiler installed. -Please refer to the InstallFromSource +Please refer to the InstallFromSource page on the Go community Wiki for operating system specific instructions.

-

Install Mercurial, if needed

+

Install Git, if needed

-To perform the next step you must have Mercurial installed. (Check that you -have an hg command.) +To perform the next step you must have Git installed. (Check that you +have a git command before proceeding.)

-If you do not have a working Mercurial installation, +If you do not have a working Git installation, follow the instructions on the -Mercurial downloads page. -

- -

-Mercurial versions 1.7.x and up require the configuration of -Certification Authorities -(CAs). Error messages of the form: -

- -
-warning: code.google.com certificate with fingerprint b1:af: ... bc not verified (check hostfingerprints or web.cacerts config setting)
-
- -

-when using Mercurial indicate that the CAs are missing. -Check your Mercurial version (hg --version) and -configure the CAs -if necessary. +Git downloads page.

@@ -121,22 +104,24 @@ if necessary.

Go will install to a directory named go. Change to the directory that will be its parent and make sure the go directory does not exist. -Then check out the repository:

+Then clone the repository and check out the latest release tag:

-$ hg clone -u release https://code.google.com/p/go
+$ git clone https://go.googlesource.com/go
+$ cd go
+$ git checkout go1.4
 
- +

If you intend to modify the go source code, and contribute your changes to the project, then move your repository -off the release branch, and onto the default (development) branch. +off the release branch, and onto the master (development) branch. Otherwise, skip this step.

-$ hg update default
+$ git checkout master
 

Install Go

@@ -259,7 +244,7 @@ $ go get golang.org/x/tools/cmd/godoc

To install these tools, the go get command requires -that Mercurial be installed locally. +that Git be installed locally.

@@ -292,22 +277,18 @@ that receives a message summarizing each checkin to the Go repository.

-Bugs can be reported using the Go issue tracker. +Bugs can be reported using the Go issue tracker.

Keeping up with releases

-The Go project maintains a stable tag in its Mercurial repository: -release. -

- -

-The release tag refers to the current stable release of Go. -Most Go users should use this version. New releases are announced on the +New releases are announced on the golang-announce mailing list. +Each announcement mentions the latest release tag, for instance, +go1.4.

@@ -316,11 +297,13 @@ To update an existing tree to the latest release, you can run:

 $ cd go/src
-$ hg pull
-$ hg update release
+$ git fetch
+$ git checkout <tag>
 $ ./all.bash
 
+Where <tag> is the version string of the release. +

Optional environment variables

-- 2.48.1