Commit ac65eaa5 authored by Russ Cox's avatar Russ Cox

dashboard: delay hg pull until needed

R=adg
CC=golang-dev
https://golang.org/cl/4526052
parent 1a7d09c8
...@@ -127,12 +127,6 @@ func main() { ...@@ -127,12 +127,6 @@ func main() {
// go continuous build mode (default) // go continuous build mode (default)
// check for new commits and build them // check for new commits and build them
for { for {
err := run(nil, goroot, "hg", "pull", "-u")
if err != nil {
log.Println("hg pull failed:", err)
time.Sleep(waitInterval)
continue
}
built := false built := false
t := time.Nanoseconds() t := time.Nanoseconds()
if *parallel { if *parallel {
...@@ -247,6 +241,15 @@ func (b *Builder) build() bool { ...@@ -247,6 +241,15 @@ func (b *Builder) build() bool {
if hash == "" { if hash == "" {
return false return false
} }
// Look for hash locally before running hg pull.
if _, err := fullHash(hash[:12]); err != nil {
// Don't have hash, so run hg pull.
if err := run(nil, goroot, "hg", "pull"); err != nil {
log.Println("hg pull failed:", err)
return false
}
}
err = b.buildHash(hash) err = b.buildHash(hash)
if err != nil { if err != nil {
log.Println(err) log.Println(err)
......
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