1
0
mirror of https://github.com/golang/go synced 2024-09-25 05:10:12 -06:00

misc/makerelease: remove mercurial-specific special case

Change-Id: I2ae40e63bc78f3b6e4eb68ccbc928368db1e606f
Reviewed-on: https://go-review.googlesource.com/1535
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Andrew Gerrand 2014-12-15 10:17:00 +11:00
parent c8bfcf5c55
commit e5ee9a824d

View File

@ -507,24 +507,11 @@ func (b *Build) extras() error {
func (b *Build) get(repoPath, revision string) error {
dest := filepath.Join(b.gopath, "src", filepath.FromSlash(repoPath))
if strings.HasPrefix(repoPath, "golang.org/x/") {
// For sub-repos, fetch the old Mercurial repo; bypass "go get".
// DO NOT import this special case into the git tree.
if err := os.MkdirAll(filepath.Dir(dest), 0755); err != nil {
return err
}
repo := strings.Replace(repoPath, "golang.org/x/", "https://code.google.com/p/go.", 1)
if _, err := b.run(b.gopath, "hg", "clone", repo, dest); err != nil {
return err
}
} else {
// Fetch the packages (without building/installing).
_, err := b.run(b.gopath, filepath.Join(b.root, "bin", "go"),
"get", "-d", repoPath+"/...")
if err != nil {
return err
}
// Fetch the packages (without building/installing).
_, err := b.run(b.gopath, filepath.Join(b.root, "bin", "go"),
"get", "-d", repoPath+"/...")
if err != nil {
return err
}
// Update the repo to the specified revision.