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

Unified Diff: scripts/slave/recipes/run_presubmit.py

Issue 2224413002: Presubmit recipe: rebase Gerrit patches. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: add expectations Created 4 years, 4 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 | scripts/slave/recipes/run_presubmit.expected/depot_tools_and_gerrit.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipes/run_presubmit.py
diff --git a/scripts/slave/recipes/run_presubmit.py b/scripts/slave/recipes/run_presubmit.py
index c895c970c17e1aa5590482f0da0c16c3f2f01d2c..861a7a4b10e42dea069fdc63f5980c678d53aedf 100644
--- a/scripts/slave/recipes/run_presubmit.py
+++ b/scripts/slave/recipes/run_presubmit.py
@@ -23,12 +23,17 @@ def _RunStepsInternal(api):
repo_name = api.properties['repo_name']
codereview_auth = api.properties.get('codereview_auth', False)
force_checkout = api.properties.get('force_checkout', False)
+ patch_storage = api.properties.get('patch_storage', 'rietveld')
api.gclient.set_config(repo_name)
+ kwargs = {}
+ if patch_storage == 'gerrit':
+ kwargs['gerrit_rebase_patch_ref'] = True
bot_update_step = api.bot_update.ensure_checkout(
force=force_checkout,
- patch_oauth2=codereview_auth)
+ patch_oauth2=codereview_auth,
+ **kwargs)
relative_root = api.gclient.calculate_patch_root(
api.properties['patch_project']).rstrip('/')
got_revision_property = api.gclient.c.got_revision_mapping[relative_root]
@@ -51,7 +56,6 @@ def _RunStepsInternal(api):
if api.properties.get('runhooks'):
api.gclient.runhooks()
- patch_storage = api.properties.get('patch_storage', 'rietveld')
if patch_storage == 'rietveld':
presubmit_args = [
'--issue', api.properties['issue'],
« no previous file with comments | « no previous file | scripts/slave/recipes/run_presubmit.expected/depot_tools_and_gerrit.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698