Add enforce_fetch to ensure_checkout cmd arg

The enforce_fetch kwarg was being ignored. This change adds the
--enforce_fetch to the resources/bot_update cmd.
Confirmed here through led: b852fa5e4bb77d6fb2aa69ec87ee57b5d2/+/steps/bot_update/0/logs/execution_details/0

Bug: 1129235
Change-Id: I78c5d62841fda6dafbb709301e26c5047df2d58d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2444114
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
changes/14/2444114/3
Stephanie Kim 5 years ago committed by LUCI CQ
parent 69e30b23c4
commit da6894f7a9

@ -58,7 +58,7 @@ Recipe module to ensure a checkout is consistent on a bot.
Wrapper for easy calling of bot_update. Wrapper for easy calling of bot_update.
&mdash; **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#522)(self, bot_update_step):** &mdash; **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#524)(self, bot_update_step):**
Deapplies a patch, taking care of DEPS and solution revisions properly. Deapplies a patch, taking care of DEPS and solution revisions properly.
@ -91,7 +91,7 @@ Args:
enforce_fetch: Enforce a new fetch to refresh the git cache, even if the enforce_fetch: Enforce a new fetch to refresh the git cache, even if the
solution revision passed in already exists in the current git cache. solution revision passed in already exists in the current git cache.
&mdash; **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#499)(self, project_name, gclient_config=None):** &mdash; **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#501)(self, project_name, gclient_config=None):**
Returns all property names used for storing the checked-out revision of Returns all property names used for storing the checked-out revision of
a given project. a given project.
@ -109,7 +109,7 @@ Returns (list of str): All properties that'll hold the checked-out revision
&emsp; **@property**<br>&mdash; **def [last\_returned\_properties](/recipes/recipe_modules/bot_update/api.py#44)(self):** &emsp; **@property**<br>&mdash; **def [last\_returned\_properties](/recipes/recipe_modules/bot_update/api.py#44)(self):**
&mdash; **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#449)(self, bot_update_json, name):** &mdash; **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#451)(self, bot_update_json, name):**
Set a fixed revision for a single dependency using project revision Set a fixed revision for a single dependency using project revision
properties. properties.

@ -276,6 +276,8 @@ class BotUpdateApi(recipe_api.RecipeApi):
cmd.append('--with_tags') cmd.append('--with_tags')
if gerrit_no_reset: if gerrit_no_reset:
cmd.append('--gerrit_no_reset') cmd.append('--gerrit_no_reset')
if enforce_fetch:
cmd.append('--enforce_fetch')
if no_fetch_tags: if no_fetch_tags:
cmd.append('--no_fetch_tags') cmd.append('--no_fetch_tags')
if gerrit_no_rebase_patch_ref: if gerrit_no_rebase_patch_ref:

@ -992,6 +992,7 @@ def parse_args():
'there are many tags.')) 'there are many tags.'))
parse.add_option( parse.add_option(
'--enforce_fetch', '--enforce_fetch',
action='store_true',
help=('Enforce a new fetch to refresh the git cache, even if the ' help=('Enforce a new fetch to refresh the git cache, even if the '
'solution revision passed in already exists in the current ' 'solution revision passed in already exists in the current '
'git cache.')) 'git cache.'))

@ -14,7 +14,7 @@ DEPS = [
def RunSteps(api): def RunSteps(api):
api.gclient.set_config('depot_tools') api.gclient.set_config('depot_tools')
api.bot_update.ensure_checkout() api.bot_update.ensure_checkout()
api.bot_update.ensure_checkout(no_fetch_tags=True) api.bot_update.ensure_checkout(no_fetch_tags=True, enforce_fetch=True)
def GenTests(api): def GenTests(api):

Loading…
Cancel
Save