From 552ddbf3bfe04c7daa75e04d17263b4cd348999b Mon Sep 17 00:00:00 2001 From: George Engelbrecht Date: Tue, 10 Mar 2020 20:44:35 +0000 Subject: [PATCH] recipe_modules: git_cl no longer has codereview --gerrit param BUG=chromium:1060257 TEST=./recipes.py test run Change-Id: Ie081430ff5f83964a53401099ce3c9bee682c7fd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2097040 Reviewed-by: Edward Lesmes Reviewed-by: David Burger Reviewed-by: George Engelbrecht Commit-Queue: George Engelbrecht --- recipes/README.recipes.md | 8 ++++---- recipes/recipe_modules/git_cl/api.py | 14 ++++---------- .../git_cl/examples/full.expected/basic.json | 4 +--- recipes/recipe_modules/git_cl/examples/full.py | 3 +-- 4 files changed, 10 insertions(+), 19 deletions(-) diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md index ee8169b96..92cbfdf16 100644 --- a/recipes/README.recipes.md +++ b/recipes/README.recipes.md @@ -533,15 +533,15 @@ remote_name (str): the remote name to rebase from if not origin #### **class [GitClApi](/recipes/recipe_modules/git_cl/api.py#9)([RecipeApi][recipe_engine/wkt/RecipeApi]):** -— **def [get\_description](/recipes/recipe_modules/git_cl/api.py#23)(self, patch_url=None, codereview=None, \*\*kwargs):** +— **def [get\_description](/recipes/recipe_modules/git_cl/api.py#23)(self, patch_url=None, \*\*kwargs):** DEPRECATED. Consider using gerrit.get_change_description instead. -— **def [issue](/recipes/recipe_modules/git_cl/api.py#54)(self, \*\*kwargs):** +— **def [issue](/recipes/recipe_modules/git_cl/api.py#48)(self, \*\*kwargs):** -— **def [set\_description](/recipes/recipe_modules/git_cl/api.py#34)(self, description, patch_url=None, codereview=None, \*\*kwargs):** +— **def [set\_description](/recipes/recipe_modules/git_cl/api.py#31)(self, description, patch_url=None, \*\*kwargs):** -— **def [upload](/recipes/recipe_modules/git_cl/api.py#47)(self, message, upload_args=None, \*\*kwargs):** +— **def [upload](/recipes/recipe_modules/git_cl/api.py#41)(self, message, upload_args=None, \*\*kwargs):** ### *recipe_modules* / [gitiles](/recipes/recipe_modules/gitiles) [DEPS](/recipes/recipe_modules/gitiles/__init__.py#5): [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step], [recipe\_engine/url][recipe_engine/recipe_modules/url] diff --git a/recipes/recipe_modules/git_cl/api.py b/recipes/recipe_modules/git_cl/api.py index c4e1e349d..557372433 100644 --- a/recipes/recipe_modules/git_cl/api.py +++ b/recipes/recipe_modules/git_cl/api.py @@ -20,24 +20,18 @@ class GitClApi(recipe_api.RecipeApi): name, self.repo_resource('git_cl.py'), [subcmd] + args, venv=True, **kwargs) - def get_description(self, patch_url=None, codereview=None, **kwargs): + def get_description(self, patch_url=None, **kwargs): """DEPRECATED. Consider using gerrit.get_change_description instead.""" args = ['-d'] - if patch_url or codereview: - assert patch_url and codereview, ( - 'Both patch_url and codereview must be provided') - args.append('--%s' % codereview) + if patch_url: args.append(patch_url) return self('description', args, stdout=self.m.raw_io.output(), **kwargs) - def set_description(self, description, patch_url=None, codereview=None, **kwargs): + def set_description(self, description, patch_url=None, **kwargs): args = ['-n', '-'] - if patch_url or codereview: - assert patch_url and codereview, ( - 'Both patch_url and codereview must be provided') + if patch_url: args.append(patch_url) - args.append('--%s' % codereview) return self( 'description', args, stdout=self.m.raw_io.output(), diff --git a/recipes/recipe_modules/git_cl/examples/full.expected/basic.json b/recipes/recipe_modules/git_cl/examples/full.expected/basic.json index 1bb2db34c..583f49298 100644 --- a/recipes/recipe_modules/git_cl/examples/full.expected/basic.json +++ b/recipes/recipe_modules/git_cl/examples/full.expected/basic.json @@ -26,7 +26,6 @@ "RECIPE_REPO[depot_tools]/git_cl.py", "description", "-d", - "--rietveld", "https://code.review/123" ], "name": "git_cl description (build)" @@ -39,8 +38,7 @@ "description", "-n", "-", - "https://code.review/123", - "--rietveld" + "https://code.review/123" ], "name": "git_cl set description", "stdin": "bammmm" diff --git a/recipes/recipe_modules/git_cl/examples/full.py b/recipes/recipe_modules/git_cl/examples/full.py index d41a0affe..723a3ae7b 100644 --- a/recipes/recipe_modules/git_cl/examples/full.py +++ b/recipes/recipe_modules/git_cl/examples/full.py @@ -19,10 +19,9 @@ def RunSteps(api): api.git_cl.issue() result = api.git_cl.get_description( patch_url='https://code.review/123', - codereview='rietveld', suffix='build') api.git_cl.set_description( - 'bammmm', patch_url='https://code.review/123', codereview='rietveld') + 'bammmm', patch_url='https://code.review/123') api.step('echo', ['echo', result.stdout]) api.git_cl.set_config('basic')