roller: Abandon old changes at the start of rolls
Bug: b/368181572
Change-Id: Ic19dd10343a7907acb027ffb1d9f0c7690d0dfe7
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/236839
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Reviewed-by: Ted Pudlik <tpudlik@google.com>
Commit-Queue: Rob Mohr <mohrr@google.com>
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/recipes/roller.py b/recipes/roller.py
index 261fd36..e3a9288 100644
--- a/recipes/roller.py
+++ b/recipes/roller.py
@@ -32,6 +32,7 @@
'fuchsia/git_roll_util',
'fuchsia/gitiles',
'fuchsia/roll_commit_message',
+ 'pigweed/abandon_old_changes',
'pigweed/bazel_roll',
'pigweed/checkout',
'pigweed/cipd_roll',
@@ -52,6 +53,8 @@
api: recipe_api.RecipeScriptApi,
props: InputProperties,
):
+ api.abandon_old_changes(host=props.checkout_options.remote)
+
# The checkout module will try to use trigger data to pull in a specific
# patch. Since the triggering commit is in a different repository that
# needs to be disabled.