Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Unified Diff: recipe_modules/bot_update/api.py

Issue 1741983002: bot_update: Rewrite to use properties, and add override options for patches. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Rebase. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/bot_update/api.py
diff --git a/recipe_modules/bot_update/api.py b/recipe_modules/bot_update/api.py
index 31db9fe05d5e338a6e9faac8880bfe7959e6d7b7..26367bb851c242a0703b8baf7668ce04da98412d 100644
--- a/recipe_modules/bot_update/api.py
+++ b/recipe_modules/bot_update/api.py
@@ -90,7 +90,19 @@ class BotUpdateApi(recipe_api.RecipeApi):
with_branch_heads=False, refs=None,
patch_project_roots=None, patch_oauth2=False,
output_manifest=True, clobber=False,
- root_solution_revision=None, **kwargs):
+ root_solution_revision=None, rietveld=None, issue=None,
+ patchset=None, **kwargs):
+ """
+ Args:
+ gclient_config: The gclient configuration to use when running bot_update.
+ If omitted, the current gclient configuration is used.
+ rietveld: The rietveld server to use. If omitted, will infer from
+ the 'rietveld' property.
+ issue: The rietveld issue number to use. If omitted, will infer from
+ the 'issue' property.
+ patchset: The rietveld issue patchset to use. If omitted, will infer from
+ the 'patchset' property.
+ """
refs = refs or []
# We can re-use the gclient spec from the gclient module, since all the
# data bot_update needs is already configured into the gclient spec.
@@ -112,8 +124,8 @@ class BotUpdateApi(recipe_api.RecipeApi):
root = self.m.path.join(root, additional)
if patch:
- issue = self._issue
- patchset = self._patchset
+ issue = issue or self._issue
+ patchset = patchset or self._patchset
patch_url = self._patch_url
gerrit_repo = self._repository
gerrit_ref = self._gerrit_ref
@@ -166,7 +178,7 @@ class BotUpdateApi(recipe_api.RecipeApi):
['--issue', issue],
['--patchset', patchset],
['--patch_url', patch_url],
- ['--rietveld_server', self._rietveld],
+ ['--rietveld_server', rietveld or self._rietveld],
['--gerrit_repo', gerrit_repo],
['--gerrit_ref', gerrit_ref],
['--apply_issue_email_file', email_file],
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698