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

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

Issue 2321203003: A bunch more little cleanups in bot_update. (Closed)
Patch Set: rebase, just in case Created 4 years, 3 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
« no previous file with comments | « no previous file | recipe_modules/bot_update/example.expected/basic.json » ('j') | 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 # This is important for projects which are checked out as DEPS of the 141 # This is important for projects which are checked out as DEPS of the
142 # gclient solution. 142 # gclient solution.
143 self.m.gclient.set_patch_project_revision( 143 self.m.gclient.set_patch_project_revision(
144 self.m.properties.get('patch_project'), cfg) 144 self.m.properties.get('patch_project'), cfg)
145 145
146 rev_map = cfg.got_revision_mapping.as_jsonish() 146 rev_map = cfg.got_revision_mapping.as_jsonish()
147 147
148 flags = [ 148 flags = [
149 # What do we want to check out (spec/root/rev/rev_map). 149 # What do we want to check out (spec/root/rev/rev_map).
150 ['--spec', self.m.gclient.config_to_pythonish(cfg)], 150 ['--spec', self.m.gclient.config_to_pythonish(cfg)],
151 ['--root', root], 151 ['--patch_root', root],
152 ['--revision_mapping_file', self.m.json.input(rev_map)], 152 ['--revision_mapping_file', self.m.json.input(rev_map)],
153 ['--git-cache-dir', cfg.cache_dir], 153 ['--git-cache-dir', cfg.cache_dir],
154 154
155 # How to find the patch, if any (issue/patchset). 155 # How to find the patch, if any (issue/patchset).
156 ['--issue', issue], 156 ['--issue', issue],
157 ['--patchset', patchset], 157 ['--patchset', patchset],
158 ['--rietveld_server', rietveld or self._rietveld], 158 ['--rietveld_server', rietveld or self._rietveld],
159 ['--gerrit_repo', gerrit_repo], 159 ['--gerrit_repo', gerrit_repo],
160 ['--gerrit_ref', gerrit_ref], 160 ['--gerrit_ref', gerrit_ref],
161 ['--apply_issue_email_file', email_file], 161 ['--apply_issue_email_file', email_file],
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 283
284 # bot_update actually just sets root to be the folder name of the 284 # bot_update actually just sets root to be the folder name of the
285 # first solution. 285 # first solution.
286 if step_result.json.output['did_run']: 286 if step_result.json.output['did_run']:
287 co_root = step_result.json.output['root'] 287 co_root = step_result.json.output['root']
288 cwd = kwargs.get('cwd', self.m.path['slave_build']) 288 cwd = kwargs.get('cwd', self.m.path['slave_build'])
289 if 'checkout' not in self.m.path: 289 if 'checkout' not in self.m.path:
290 self.m.path['checkout'] = cwd.join(*co_root.split(self.m.path.sep)) 290 self.m.path['checkout'] = cwd.join(*co_root.split(self.m.path.sep))
291 291
292 return step_result 292 return step_result
OLDNEW
« no previous file with comments | « no previous file | recipe_modules/bot_update/example.expected/basic.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698