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

Unified Diff: recipe_modules/bot_update/api.py

Issue 1686273002: Bot update cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Review Created 4 years, 10 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 | recipe_modules/bot_update/example.py » ('j') | 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 4b870a4b7eef2d5e2fb47b8df480a9459b1a27f2..610872e5f33cb266dc25e4735e1e70fce74eb274 100644
--- a/recipe_modules/bot_update/api.py
+++ b/recipe_modules/bot_update/api.py
@@ -8,12 +8,6 @@
from recipe_engine import recipe_api
-# This is just for testing, to indicate if a master is using a Git scheduler
-# or not.
-SVN_MASTERS = (
- 'experimental.svn',
-)
-
def jsonish_to_python(spec, is_top=False):
"""Turn a json spec into a python parsable object.
@@ -67,9 +61,10 @@ class BotUpdateApi(recipe_api.RecipeApi):
def properties(self):
return self._properties
+ # Note: force is ignored.
def ensure_checkout(self, gclient_config=None, suffix=None,
patch=True, update_presentation=True,
- force=False, patch_root=None, no_shallow=False,
+ force=True, patch_root=None, no_shallow=False,
with_branch_heads=False, refs=None,
patch_project_roots=None, patch_oauth2=False,
output_manifest=True, clobber=False,
@@ -80,11 +75,6 @@ class BotUpdateApi(recipe_api.RecipeApi):
cfg = gclient_config or self.m.gclient.c
spec_string = jsonish_to_python(cfg.as_jsonish(), True)
- # Used by bot_update to determine if we want to run or not.
- master = self.m.properties['mastername']
- builder = self.m.properties['buildername']
- slave = self.m.properties['slavename']
-
# Construct our bot_update command. This basically be inclusive of
# everything required for bot_update to know:
root = patch_root
@@ -136,18 +126,13 @@ class BotUpdateApi(recipe_api.RecipeApi):
rev_map = self.m.gclient.c.got_revision_mapping.as_jsonish()
flags = [
- # 1. Do we want to run? (master/builder/slave).
- ['--master', master],
- ['--builder', builder],
- ['--slave', slave],
-
- # 2. What do we want to check out (spec/root/rev/rev_map).
+ # 1. What do we want to check out (spec/root/rev/rev_map).
['--spec', spec_string],
['--root', root],
['--revision_mapping_file', self.m.json.input(rev_map)],
['--git-cache-dir', self.m.path['git_cache']],
- # 3. How to find the patch, if any (issue/patchset/patch_url).
+ # 2. How to find the patch, if any (issue/patchset/patch_url).
['--issue', issue],
['--patchset', patchset],
['--patch_url', patch_url],
@@ -157,7 +142,7 @@ class BotUpdateApi(recipe_api.RecipeApi):
['--apply_issue_email_file', email_file],
['--apply_issue_key_file', key_file],
- # 4. Hookups to JSON output back into recipes.
+ # 3. Hookups to JSON output back into recipes.
['--output_json', self.m.json.output()],]
@@ -197,8 +182,6 @@ class BotUpdateApi(recipe_api.RecipeApi):
if clobber:
cmd.append('--clobber')
- if force:
- cmd.append('--force')
if no_shallow:
cmd.append('--no_shallow')
if output_manifest:
@@ -207,11 +190,9 @@ class BotUpdateApi(recipe_api.RecipeApi):
cmd.append('--with_branch_heads')
# Inject Json output for testing.
- git_mode = self.m.properties.get('mastername') not in SVN_MASTERS
first_sln = cfg.solutions[0].name
step_test_data = lambda: self.test_api.output_json(
- master, builder, slave, root, first_sln, rev_map, git_mode, force,
- self.m.properties.get('fail_patch', False),
+ root, first_sln, rev_map, self.m.properties.get('fail_patch', False),
output_manifest=output_manifest, fixed_revisions=fixed_revisions)
# Add suffixes to the step name, if specified.
« no previous file with comments | « no previous file | recipe_modules/bot_update/example.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698