Commit bb4a4909 authored by Shenghou Ma's avatar Shenghou Ma Committed by Russ Cox

builder: reuse existing workspace if possible

R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5690069
parent 213997a7
......@@ -94,7 +94,10 @@ func main() {
return
}
// set up work environment
// set up work environment, use existing enviroment if possible
if hgRepoExists(goroot) {
log.Print("Found old workspace, will use it")
} else {
if err := os.RemoveAll(*buildroot); err != nil {
log.Fatalf("Error removing build root (%s): %s", *buildroot, err)
}
......@@ -104,6 +107,7 @@ func main() {
if err := hgClone(hgUrl, goroot); err != nil {
log.Fatal("Error cloning repository:", err)
}
}
if *commitFlag {
if len(flag.Args()) == 0 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment