@ -80,7 +80,7 @@ class BotUpdateApi(recipe_api.RecipeApi):
patchset = None , gerrit_no_reset = False ,
patchset = None , gerrit_no_reset = False ,
gerrit_no_rebase_patch_ref = False ,
gerrit_no_rebase_patch_ref = False ,
disable_syntax_validation = False , manifest_name = None ,
disable_syntax_validation = False , manifest_name = None ,
patch_refs = None ,
patch_refs = None , ignore_input_commit = False ,
* * kwargs ) :
* * kwargs ) :
"""
"""
Args :
Args :
@ -153,17 +153,20 @@ class BotUpdateApi(recipe_api.RecipeApi):
if solution . revision :
if solution . revision :
revisions [ solution . name ] = solution . revision
revisions [ solution . name ] = solution . revision
# Apply input gitiles_commit, if any.
# HACK: ensure_checkout API must be redesigned so that we don't pass such
input_commit = self . m . buildbucket . build . input . gitiles_commit
# parameters. Existing semantics is too opiniated.
if input_commit . id or input_commit . ref :
if not ignore_input_commit :
repo_path = self . _get_commit_repo_path ( input_commit , cfg )
# Apply input gitiles_commit, if any.
# Note: this is not entirely correct. build.input.gitiles_commit
input_commit = self . m . buildbucket . build . input . gitiles_commit
# definition says "The Gitiles commit to run against.".
if input_commit . id or input_commit . ref :
# However, here we ignore it if the config specified a revision.
repo_path = self . _get_commit_repo_path ( input_commit , cfg )
# This is necessary because existing builders rely on this behavior, e.g.
# Note: this is not entirely correct. build.input.gitiles_commit
# they want to force refs/heads/master at the config level.
# definition says "The Gitiles commit to run against.".
revisions [ repo_path ] = (
# However, here we ignore it if the config specified a revision.
revisions . get ( repo_path ) or input_commit . id or input_commit . ref )
# This is necessary because existing builders rely on this behavior,
# e.g. they want to force refs/heads/master at the config level.
revisions [ repo_path ] = (
revisions . get ( repo_path ) or input_commit . id or input_commit . ref )
# Guarantee that first solution has a revision.
# Guarantee that first solution has a revision.
# TODO(machenbach): We should explicitly pass HEAD for ALL solutions
# TODO(machenbach): We should explicitly pass HEAD for ALL solutions