OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 from slave import recipe_api | 5 from slave import recipe_api |
6 | 6 |
7 class RietveldApi(recipe_api.RecipeApi): | 7 class RietveldApi(recipe_api.RecipeApi): |
8 def calculate_issue_root(self): | 8 def calculate_issue_root(self): |
9 root = self.m.properties.get('root', '') | 9 root = self.m.properties.get('root', '') |
10 # FIXME: Rietveld passes the blink path as src/third_party/WebKit | 10 # FIXME: Rietveld passes the blink path as src/third_party/WebKit |
11 # so we have to strip the src bit off before passing to | 11 # so we have to strip the src bit off before passing to |
12 # api.checkout_path. :( | 12 # api.checkout_path. :( |
13 if root.startswith('src'): | 13 if root.startswith('src'): |
14 root = root[3:].lstrip('/') | 14 root = root[3:].lstrip('/') |
15 return root | 15 return root |
16 | 16 |
17 def apply_issue(self, *root_pieces): | 17 def apply_issue(self, *root_pieces): |
18 return self.m.step('apply_issue', [ | 18 return self.m.python('apply_issue', |
19 self.m.path.depot_tools('apply_issue'), | 19 self.m.path.depot_tools('apply_issue.py'), [ |
20 '-r', self.m.path.checkout(*root_pieces), | 20 '-r', self.m.path.checkout(*root_pieces), |
21 '-i', self.m.properties['issue'], | 21 '-i', self.m.properties['issue'], |
22 '-p', self.m.properties['patchset'], | 22 '-p', self.m.properties['patchset'], |
23 '-s', self.m.properties['rietveld'], | 23 '-s', self.m.properties['rietveld'], |
24 '-e', 'commit-bot@chromium.org']) | 24 '-e', 'commit-bot@chromium.org', |
| 25 '--no-commit']) |
25 | 26 |
OLD | NEW |