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

Side by Side Diff: recipe_modules/bot_update/api.py

Issue 1748143002: Read got_revision_mapping from built in spec (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 5
6 """Recipe module to ensure a checkout is consistant on a bot.""" 6 """Recipe module to ensure a checkout is consistant on a bot."""
7 7
8 from recipe_engine import recipe_api 8 from recipe_engine import recipe_api
9 9
10 10
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 # Point to the oauth2 auth files if specified. 124 # Point to the oauth2 auth files if specified.
125 # These paths are where the bots put their credential files. 125 # These paths are where the bots put their credential files.
126 if patch_oauth2: 126 if patch_oauth2:
127 email_file = self.m.path['build'].join( 127 email_file = self.m.path['build'].join(
128 'site_config', '.rietveld_client_email') 128 'site_config', '.rietveld_client_email')
129 key_file = self.m.path['build'].join( 129 key_file = self.m.path['build'].join(
130 'site_config', '.rietveld_secret_key') 130 'site_config', '.rietveld_secret_key')
131 else: 131 else:
132 email_file = key_file = None 132 email_file = key_file = None
133 133
134 rev_map = {} 134 rev_map = cfg.got_revision_mapping.as_jsonish()
135 if self.m.gclient.c:
136 rev_map = self.m.gclient.c.got_revision_mapping.as_jsonish()
137 135
138 flags = [ 136 flags = [
139 # 1. Do we want to run? (master/builder/slave). 137 # 1. Do we want to run? (master/builder/slave).
140 ['--master', master], 138 ['--master', master],
141 ['--builder', builder], 139 ['--builder', builder],
142 ['--slave', slave], 140 ['--slave', slave],
143 141
144 # 2. What do we want to check out (spec/root/rev/rev_map). 142 # 2. What do we want to check out (spec/root/rev/rev_map).
145 ['--spec', spec_string], 143 ['--spec', spec_string],
146 ['--root', root], 144 ['--root', root],
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 270
273 # bot_update actually just sets root to be the folder name of the 271 # bot_update actually just sets root to be the folder name of the
274 # first solution. 272 # first solution.
275 if step_result.json.output['did_run']: 273 if step_result.json.output['did_run']:
276 co_root = step_result.json.output['root'] 274 co_root = step_result.json.output['root']
277 cwd = kwargs.get('cwd', self.m.path['slave_build']) 275 cwd = kwargs.get('cwd', self.m.path['slave_build'])
278 if 'checkout' not in self.m.path: 276 if 'checkout' not in self.m.path:
279 self.m.path['checkout'] = cwd.join(*co_root.split(self.m.path.sep)) 277 self.m.path['checkout'] = cwd.join(*co_root.split(self.m.path.sep))
280 278
281 return step_result 279 return step_result
OLDNEW
« 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