From d69c5dd538ee50cb088a57bce7e33ef6676ddd13 Mon Sep 17 00:00:00 2001 From: Edward Lesmes Date: Mon, 2 Apr 2018 14:47:13 -0400 Subject: [PATCH] bot_update: Don't patch if gerrit_repo or gerrit_ref are empty/None. We should apply the patch only when gerrit_repo and gerrit_ref are passed, instead of using only the --apply-patch-on-gclient flag. R=agable@chromium.org Bug: 643346 Change-Id: I28547aed9daeefa2657a108e0bacbfd4fc9fa07e Reviewed-on: https://chromium-review.googlesource.com/989667 Reviewed-by: Aaron Gable Commit-Queue: Edward Lesmes --- recipes/recipe_modules/bot_update/resources/bot_update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/recipe_modules/bot_update/resources/bot_update.py b/recipes/recipe_modules/bot_update/resources/bot_update.py index 5efb4c2e9..7e3de71fa 100755 --- a/recipes/recipe_modules/bot_update/resources/bot_update.py +++ b/recipes/recipe_modules/bot_update/resources/bot_update.py @@ -354,7 +354,7 @@ def gclient_sync( revision = 'origin/master' args.extend(['--revision', '%s@%s' % (name, revision)]) - if apply_patch_on_gclient: + if apply_patch_on_gclient and gerrit_repo and gerrit_ref: # TODO(ehmaldonado): Merge gerrit_repo and gerrit_ref into a patch-ref flag # and add support for passing multiple patch refs. args.extend(['--patch-ref', gerrit_repo + '@' + gerrit_ref])