diff --git a/recipes/recipe_modules/bot_update/api.py b/recipes/recipe_modules/bot_update/api.py index 7a1d08484..d778e7288 100644 --- a/recipes/recipe_modules/bot_update/api.py +++ b/recipes/recipe_modules/bot_update/api.py @@ -15,7 +15,7 @@ class BotUpdateApi(recipe_api.RecipeApi): patch_gerrit_url, revision, parent_got_revision, deps_revision_overrides, fail_patch, *args, **kwargs): self._apply_patch_on_gclient = properties.get( - 'apply_patch_on_gclient', True) + 'apply_patch_on_gclient', False) self._issue = patch_issue self._patchset = patch_set self._repository = repository or patch_repository_url @@ -207,8 +207,8 @@ class BotUpdateApi(recipe_api.RecipeApi): cmd.append('--gerrit_no_rebase_patch_ref') if disable_syntax_validation or cfg.disable_syntax_validation: cmd.append('--disable-syntax-validation') - if not self._apply_patch_on_gclient: - cmd.append('--no-apply-patch-on-gclient') + if self._apply_patch_on_gclient: + cmd.append('--apply-patch-on-gclient') # Inject Json output for testing. first_sln = cfg.solutions[0].name diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/no_apply_patch_on_gclient.json b/recipes/recipe_modules/bot_update/examples/full.expected/apply_patch_on_gclient.json similarity index 99% rename from recipes/recipe_modules/bot_update/examples/full.expected/no_apply_patch_on_gclient.json rename to recipes/recipe_modules/bot_update/examples/full.expected/apply_patch_on_gclient.json index 25887e98e..81fdb28cf 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/no_apply_patch_on_gclient.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/apply_patch_on_gclient.json @@ -69,7 +69,7 @@ "--revision", "src/third_party/angle@HEAD", "--disable-syntax-validation", - "--no-apply-patch-on-gclient" + "--apply-patch-on-gclient" ], "env_prefixes": { "PATH": [ @@ -170,7 +170,7 @@ "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9", "--revision", "src/third_party/angle@fac9503c46405f77757b9a728eb85b8d7bc6080c", - "--no-apply-patch-on-gclient" + "--apply-patch-on-gclient" ], "env_prefixes": { "PATH": [ diff --git a/recipes/recipe_modules/bot_update/examples/full.py b/recipes/recipe_modules/bot_update/examples/full.py index 010bdd8a4..88a936a6f 100644 --- a/recipes/recipe_modules/bot_update/examples/full.py +++ b/recipes/recipe_modules/bot_update/examples/full.py @@ -193,12 +193,12 @@ def GenTests(api): patch_issue=338811, patch_set=3, ) - yield api.test('no_apply_patch_on_gclient') + api.properties.tryserver( + yield api.test('apply_patch_on_gclient') + api.properties.tryserver( gerrit_project='angle/angle', patch_issue=338811, patch_set=3, ) + api.bot_update.properties( - apply_patch_on_gclient=False, + apply_patch_on_gclient=True, ) yield api.test('tryjob_gerrit_v8') + api.properties.tryserver( gerrit_project='v8/v8', diff --git a/recipes/recipe_modules/bot_update/resources/bot_update.py b/recipes/recipe_modules/bot_update/resources/bot_update.py index 676c8503d..b3c8241d7 100755 --- a/recipes/recipe_modules/bot_update/resources/bot_update.py +++ b/recipes/recipe_modules/bot_update/resources/bot_update.py @@ -1028,9 +1028,7 @@ def parse_args(): parse.add_option( '--disable-syntax-validation', action='store_true', help='Disable validation of .gclient and DEPS syntax.') - parse.add_option('--no-apply-patch-on-gclient', - dest='apply_patch_on_gclient', action='store_false', - default=True, + parse.add_option('--apply-patch-on-gclient', action='store_true', help='Patch the gerrit ref in gclient instead of here.') options, args = parse.parse_args()