diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md index 61543602c..73a1f7b17 100644 --- a/recipes/README.recipes.md +++ b/recipes/README.recipes.md @@ -58,7 +58,7 @@ Recipe module to ensure a checkout is consistent on a bot. Wrapper for easy calling of bot_update. -— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#522)(self, bot_update_step):** +— **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. @@ -91,7 +91,7 @@ Args: 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. -— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#499)(self, project_name, gclient_config=None):** +— **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 a given project. @@ -109,7 +109,7 @@ Returns (list of str): All properties that'll hold the checked-out revision   **@property**
— **def [last\_returned\_properties](/recipes/recipe_modules/bot_update/api.py#44)(self):** -— **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#449)(self, bot_update_json, name):** +— **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 properties. diff --git a/recipes/recipe_modules/bot_update/api.py b/recipes/recipe_modules/bot_update/api.py index ffa426bdd..558c56150 100644 --- a/recipes/recipe_modules/bot_update/api.py +++ b/recipes/recipe_modules/bot_update/api.py @@ -276,6 +276,8 @@ class BotUpdateApi(recipe_api.RecipeApi): cmd.append('--with_tags') if gerrit_no_reset: cmd.append('--gerrit_no_reset') + if enforce_fetch: + cmd.append('--enforce_fetch') if no_fetch_tags: cmd.append('--no_fetch_tags') if gerrit_no_rebase_patch_ref: diff --git a/recipes/recipe_modules/bot_update/resources/bot_update.py b/recipes/recipe_modules/bot_update/resources/bot_update.py index f5bd23e4c..cdf8f144e 100755 --- a/recipes/recipe_modules/bot_update/resources/bot_update.py +++ b/recipes/recipe_modules/bot_update/resources/bot_update.py @@ -992,6 +992,7 @@ def parse_args(): 'there are many tags.')) parse.add_option( '--enforce_fetch', + action='store_true', help=('Enforce a new fetch to refresh the git cache, even if the ' 'solution revision passed in already exists in the current ' 'git cache.')) diff --git a/recipes/recipe_modules/bot_update/tests/ensure_checkout.py b/recipes/recipe_modules/bot_update/tests/ensure_checkout.py index 6615eaf8c..3f5270d4f 100644 --- a/recipes/recipe_modules/bot_update/tests/ensure_checkout.py +++ b/recipes/recipe_modules/bot_update/tests/ensure_checkout.py @@ -14,7 +14,7 @@ DEPS = [ def RunSteps(api): api.gclient.set_config('depot_tools') 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):