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

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

Issue 2453663004: Remove apply_gerrit_ref from bot_update recipe API (Closed)
Patch Set: Comment Created 4 years, 1 month 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 | 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 26 matching lines...) Expand all
37 kwargs['env'].setdefault('PATH', '%(PATH)s') 37 kwargs['env'].setdefault('PATH', '%(PATH)s')
38 kwargs['env']['PATH'] = self.m.path.pathsep.join([ 38 kwargs['env']['PATH'] = self.m.path.pathsep.join([
39 kwargs['env']['PATH'], str(self._module.PACKAGE_REPO_ROOT)]) 39 kwargs['env']['PATH'], str(self._module.PACKAGE_REPO_ROOT)])
40 return self.m.python(name, bot_update_path, cmd, **kwargs) 40 return self.m.python(name, bot_update_path, cmd, **kwargs)
41 41
42 @property 42 @property
43 def last_returned_properties(self): 43 def last_returned_properties(self):
44 return self._last_returned_properties 44 return self._last_returned_properties
45 45
46 # DO NOT USE. 46 # DO NOT USE.
47 # The below method will be removed after there are no more callers of 47 # TODO(tandrii): refactor this into tryserver.maybe_apply_patch
48 # tryserver.maybe_apply_issue (skbug.com/5588).
49 def apply_gerrit_ref(self, root, gerrit_no_reset=False, 48 def apply_gerrit_ref(self, root, gerrit_no_reset=False,
50 gerrit_no_rebase_patch_ref=False, **kwargs): 49 gerrit_no_rebase_patch_ref=False, **kwargs):
51 apply_gerrit_path = self.resource('apply_gerrit.py') 50 apply_gerrit_path = self.resource('apply_gerrit.py')
52 kwargs.setdefault('infra_step', True) 51 kwargs.setdefault('infra_step', True)
53 kwargs.setdefault('env', {}).setdefault('PATH', '%(PATH)s') 52 kwargs.setdefault('env', {}).setdefault('PATH', '%(PATH)s')
54 kwargs['env']['PATH'] = self.m.path.pathsep.join([ 53 kwargs['env']['PATH'] = self.m.path.pathsep.join([
55 kwargs['env']['PATH'], str(self._module.PACKAGE_REPO_ROOT)]) 54 kwargs['env']['PATH'], str(self._module.PACKAGE_REPO_ROOT)])
56 cmd = [ 55 cmd = [
57 '--gerrit_repo', self._repository, 56 '--gerrit_repo', self._repository,
58 '--gerrit_ref', self._gerrit_ref or '', 57 '--gerrit_ref', self._gerrit_ref or '',
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 299
301 # bot_update actually just sets root to be the folder name of the 300 # bot_update actually just sets root to be the folder name of the
302 # first solution. 301 # first solution.
303 if step_result.json.output['did_run']: 302 if step_result.json.output['did_run']:
304 co_root = step_result.json.output['root'] 303 co_root = step_result.json.output['root']
305 cwd = kwargs.get('cwd', self.m.path['slave_build']) 304 cwd = kwargs.get('cwd', self.m.path['slave_build'])
306 if 'checkout' not in self.m.path: 305 if 'checkout' not in self.m.path:
307 self.m.path['checkout'] = cwd.join(*co_root.split(self.m.path.sep)) 306 self.m.path['checkout'] = cwd.join(*co_root.split(self.m.path.sep))
308 307
309 return step_result 308 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