// 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 {
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)