Commit 521c9ed1 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

Support overriding gclient config in a bot_update method

Bug: 713356
TBR=tandrii@chromium.org

Change-Id: I15d73492712b66c7670793f3c47e4cbd89d4e1cd
Reviewed-on: https://chromium-review.googlesource.com/484440Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
parent 93f69da3
......@@ -357,21 +357,23 @@ class BotUpdateApi(recipe_api.RecipeApi):
# TODO(machenbach): Replace usages of this method eventually by direct calls
# to the manifest output.
def get_project_revision_properties(self, project_name):
def get_project_revision_properties(self, project_name, gclient_config=None):
"""Returns all property names used for storing the checked-out revision of
a given project.
Args:
project_name (str): The name of a checked-out project as deps path, e.g.
src or src/v8.
gclient_config: The gclient configuration to use. If omitted, the current
gclient configuration is used.
Returns (list of str): All properties that'll hold the checked-out revision
of the given project. An empty list if no such properties exist.
"""
cfg = gclient_config or self.m.gclient.c
# Sort for determinism. We might have several properties for the same
# project, e.g. got_revision and got_webrtc_revision.
rev_reverse_map = self.m.gclient.got_revision_reverse_mapping(
self.m.gclient.c)
rev_reverse_map = self.m.gclient.got_revision_reverse_mapping(cfg)
return sorted(
prop
for prop, project in rev_reverse_map.iteritems()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment