From 76d0e6aca79faa718a06a7afb16335386eb582d6 Mon Sep 17 00:00:00 2001 From: Josip Sokcevic Date: Tue, 26 Jan 2021 21:56:06 +0000 Subject: [PATCH] [bot_update] Resolve revision only if patching If bot_update is not patching, it shouldn't look into gitiles patch information. R=ehmaldonado@google.com Bug: 1147625 Recipe-Nontrivial-Roll: build Change-Id: I111f0dc1c36d588341c02930bf1cda1f5b8cc2e7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2644199 Reviewed-by: Edward Lesmes Commit-Queue: Josip Sokcevic --- recipes/recipe_modules/bot_update/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipe_modules/bot_update/api.py b/recipes/recipe_modules/bot_update/api.py index e634b8e51..e864b76d7 100644 --- a/recipes/recipe_modules/bot_update/api.py +++ b/recipes/recipe_modules/bot_update/api.py @@ -240,8 +240,8 @@ class BotUpdateApi(recipe_api.RecipeApi): fixed_revision = self.m.gclient.resolve_revision(revision) if fixed_revision: fixed_revisions[name] = fixed_revision - if fixed_revision.upper() == 'HEAD': - # Sync to correct destination ref if HEAD was specified. + if fixed_revision.upper() == 'HEAD' and patch: + # Sync to correct destination ref fixed_revision = self._destination_ref(cfg, name) # If we're syncing to a ref, we want to make sure it exists before # trying to check it out.