1
0
mirror of https://github.com/golang/go synced 2024-11-22 06:34:40 -07:00

gobuilder: increase log limit

It's a balance between fetching too much
and falling far enough behind that you can't
catch up.  We missed 20 commits in a row
when the builders were down for a few days.
This gives us a little more leeway.

R=adg
CC=golang-dev
https://golang.org/cl/4936047
This commit is contained in:
Russ Cox 2011-08-23 22:39:39 -04:00
parent 03582b3308
commit 74fc7d8f12

View File

@ -479,7 +479,7 @@ func commitPoll(key string) {
return return
} }
const N = 20 // how many revisions to grab const N = 50 // how many revisions to grab
data, _, err := runLog(nil, "", goroot, "hg", "log", data, _, err := runLog(nil, "", goroot, "hg", "log",
"--encoding=utf-8", "--encoding=utf-8",
@ -507,12 +507,12 @@ func commitPoll(key string) {
// Non-empty parent has form 1234:hashhashhash; we want full hash. // Non-empty parent has form 1234:hashhashhash; we want full hash.
for i := range logs { for i := range logs {
l := &logs[i] l := &logs[i]
log.Printf("hg log: %s < %s\n", l.Hash, l.Parent)
if l.Parent == "" && i+1 < len(logs) { if l.Parent == "" && i+1 < len(logs) {
l.Parent = logs[i+1].Hash l.Parent = logs[i+1].Hash
} else if l.Parent != "" { } else if l.Parent != "" {
l.Parent, _ = fullHash(l.Parent) l.Parent, _ = fullHash(l.Parent)
} }
log.Printf("hg log: %s < %s\n", l.Hash, l.Parent)
if l.Parent == "" { if l.Parent == "" {
// Can't create node without parent. // Can't create node without parent.
continue continue