[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 <ehmaldonado@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
changes/99/2644199/3
Josip Sokcevic 5 years ago committed by LUCI CQ
parent d686b1d1c8
commit 76d0e6aca7

@ -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.

Loading…
Cancel
Save