| OLD | NEW |
| 1 // Copyright 2015 The LUCI Authors. | 1 // Copyright 2015 The LUCI Authors. |
| 2 // | 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
| 6 // | 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // | 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 // single revisions for now. HACKS! | 308 // single revisions for now. HACKS! |
| 309 if rb.SourceStamp.Revision != nil { | 309 if rb.SourceStamp.Revision != nil { |
| 310 revisionBytes, err := hex.DecodeString(rb.SourceStamp.Re
vision.Label) | 310 revisionBytes, err := hex.DecodeString(rb.SourceStamp.Re
vision.Label) |
| 311 if err != nil { | 311 if err != nil { |
| 312 logging.WithError(err).Warningf(c, "bad revision
(not hex-decodable)") | 312 logging.WithError(err).Warningf(c, "bad revision
(not hex-decodable)") |
| 313 } else { | 313 } else { |
| 314 bs.Manifests = append(bs.Manifests, model.Manife
stLink{ | 314 bs.Manifests = append(bs.Manifests, model.Manife
stLink{ |
| 315 Name: "REVISION", | 315 Name: "REVISION", |
| 316 ID: []byte(rb.SourceStamp.Revision.Lab
el), | 316 ID: []byte(rb.SourceStamp.Revision.Lab
el), |
| 317 }) | 317 }) |
| 318 » » » » consoles, err := common.GetConsolesForBuilder(c,
bs.BuilderID) | 318 » » » » consoles, err := common.GetAllConsoles(c, bs.Bui
lderID) |
| 319 if err != nil { | 319 if err != nil { |
| 320 return err | 320 return err |
| 321 } | 321 } |
| 322 for _, con := range consoles { | 322 for _, con := range consoles { |
| 323 // HACK(iannucci): Until we have real ma
nifest support, console | 323 // HACK(iannucci): Until we have real ma
nifest support, console |
| 324 // definitions will specify their manife
st as "REVISION", and we'll do | 324 // definitions will specify their manife
st as "REVISION", and we'll do |
| 325 // lookups with null URL fields. | 325 // lookups with null URL fields. |
| 326 bs.AddManifestKey( | 326 bs.AddManifestKey( |
| 327 » » » » » » con.ProjectID, con.Console.Name,
"REVISION", "", revisionBytes) | 327 » » » » » » con.GetProjectName(), con.ID, "R
EVISION", "", revisionBytes) |
| 328 } | 328 } |
| 329 } | 329 } |
| 330 } | 330 } |
| 331 if rb.SourceStamp.Changelist != nil { | 331 if rb.SourceStamp.Changelist != nil { |
| 332 bs.Patches = append(bs.Patches, model.PatchInfo{ | 332 bs.Patches = append(bs.Patches, model.PatchInfo{ |
| 333 Link: rb.SourceStamp.Changelist.Link, | 333 Link: rb.SourceStamp.Changelist.Link, |
| 334 AuthorEmail: rb.SourceStamp.AuthorEmail, | 334 AuthorEmail: rb.SourceStamp.AuthorEmail, |
| 335 }) | 335 }) |
| 336 } | 336 } |
| 337 } | 337 } |
| 338 return nil | 338 return nil |
| 339 } | 339 } |
| OLD | NEW |