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: https://logs.chromium.org/logs/chromium/led/kimstephanie_google.com/b852fa5e4bd75b11d2dfd35bb66caa5147698ad1b77d6fb2aa69ec87ee57b5d2/+/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>
diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md
index 6154360..73a1f7b 100644
--- a/recipes/README.recipes.md
+++ b/recipes/README.recipes.md
@@ -58,7 +58,7 @@
 
 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.
     
@@ -91,7 +91,7 @@
   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.
 
-&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
 a given project.
@@ -109,7 +109,7 @@
 
 &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
 properties.
diff --git a/recipes/recipe_modules/bot_update/api.py b/recipes/recipe_modules/bot_update/api.py
index ffa426b..558c561 100644
--- a/recipes/recipe_modules/bot_update/api.py
+++ b/recipes/recipe_modules/bot_update/api.py
@@ -276,6 +276,8 @@
       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 f5bd23e..cdf8f14 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 @@
             '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 6615eaf..3f5270d 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 @@
 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):