1
0
mirror of https://github.com/golang/go synced 2024-11-12 00:20:22 -07:00

dashboard: delay hg pull until needed

R=adg
CC=golang-dev
https://golang.org/cl/4526052
This commit is contained in:
Russ Cox 2011-05-13 12:14:31 -04:00
parent 1a7d09c847
commit ac65eaa5b9

View File

@ -127,12 +127,6 @@ func main() {
// go continuous build mode (default)
// check for new commits and build them
for {
err := run(nil, goroot, "hg", "pull", "-u")
if err != nil {
log.Println("hg pull failed:", err)
time.Sleep(waitInterval)
continue
}
built := false
t := time.Nanoseconds()
if *parallel {
@ -247,6 +241,15 @@ func (b *Builder) build() bool {
if hash == "" {
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)
if err != nil {
log.Println(err)