114
126
// AddResult adds the denormalized Reuslt data to the Commit's Result field.
115
127
// It must be called from inside a datastore transaction.
116
128
func (com *Commit) AddResult(c appengine.Context, r *Result) error {
117
129
if err := datastore.Get(c, com.Key(c), com); err != nil {
118
130
return fmt.Errorf("getting Commit: %v", err)
121
133
if _, err := datastore.Put(c, com.Key(c), com); err != nil {
122
134
return fmt.Errorf("putting Commit: %v", err)
127
151
// Result returns the build Result for this Commit for the given builder/goHash.
128
152
func (c *Commit) Result(builder, goHash string) *Result {
129
153
for _, r := range c.ResultData {