Remove directly accessing got_revision_mapping

Bug: 713356
Change-Id: I2c5d92152b293ca553efc875f49c28fb0fc888ed
Reviewed-on: https://chromium-review.googlesource.com/484460
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
changes/60/484460/3
Michael Achenbach 8 years ago committed by Commit Bot
parent 1e71b8bdf0
commit c180dc4030

@ -166,7 +166,7 @@ class GclientApi(recipe_api.RecipeApi):
if fixed_revision:
revisions.extend(['--revision', '%s@%s' % (name, fixed_revision)])
test_data_paths = set(cfg.got_revision_mapping.keys() +
test_data_paths = set(self.got_revision_reverse_mapping(cfg).values() +
[s.name for s in cfg.solutions])
step_test_data = lambda: (
self.test_api.output_json(test_data_paths))
@ -195,12 +195,12 @@ class GclientApi(recipe_api.RecipeApi):
**kwargs)
finally:
result = self.m.step.active_result
data = result.json.output
for path, info in data['solutions'].iteritems():
solutions = result.json.output['solutions']
for propname, path in sorted(
self.got_revision_reverse_mapping(cfg).iteritems()):
# gclient json paths always end with a slash
path = path.rstrip('/')
if path in cfg.got_revision_mapping:
propname = cfg.got_revision_mapping[path]
info = solutions.get(path + '/') or solutions.get(path)
if info:
result.presentation.properties[propname] = info['revision']
return result

Loading…
Cancel
Save