1
0
mirror of https://github.com/golang/go synced 2024-10-01 01:38:33 -06:00

x/tools/dashboard/app: respect gohash in Commit.AddResult

This should fix the issue where results sub-repo results are clobbered
by subsequent commits. (Much like the previous fix, which only
fixed the issue for main repo commits.)

TBR=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/167440044
This commit is contained in:
Andrew Gerrand 2014-11-10 13:58:29 +11:00
parent 8bd0dd9d19
commit ab43333964

View File

@ -154,7 +154,7 @@ func (com *Commit) AddResult(c appengine.Context, r *Result) error {
var resultExists bool
for i, s := range com.ResultData {
// if there already exists result data for this builder at com, overwrite it.
if strings.HasPrefix(s, r.Builder+"|") {
if strings.HasPrefix(s, r.Builder+"|") && strings.HasSuffix(s, "|"+r.GoHash) {
resultExists = true
com.ResultData[i] = r.Data()
}