| 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 import urlparse | 5 import urlparse |
| 6 | 6 |
| 7 from slave import recipe_api | 7 from recipe_engine import recipe_api |
| 8 | 8 |
| 9 | 9 |
| 10 class RietveldApi(recipe_api.RecipeApi): | 10 class RietveldApi(recipe_api.RecipeApi): |
| 11 def calculate_issue_root(self, extra_patch_project_roots=None): | 11 def calculate_issue_root(self, extra_patch_project_roots=None): |
| 12 """Returns path where a patch should be applied to based on "patch_project". | 12 """Returns path where a patch should be applied to based on "patch_project". |
| 13 | 13 |
| 14 Maps Rietveld's "patch_project" to a path of directories relative to | 14 Maps Rietveld's "patch_project" to a path of directories relative to |
| 15 api.gclient.c.solutions[0].name which describe where to place the patch. | 15 api.gclient.c.solutions[0].name which describe where to place the patch. |
| 16 | 16 |
| 17 Args: | 17 Args: |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 self.m.path['depot_tools'].join('apply_issue.py'), [ | 77 self.m.path['depot_tools'].join('apply_issue.py'), [ |
| 78 '-r', self.m.path['checkout'].join(*root_pieces), | 78 '-r', self.m.path['checkout'].join(*root_pieces), |
| 79 '-i', issue_number, | 79 '-i', issue_number, |
| 80 '-p', self.m.properties['patchset'], | 80 '-p', self.m.properties['patchset'], |
| 81 '-s', rietveld_url, | 81 '-s', rietveld_url, |
| 82 '--no-auth'], | 82 '--no-auth'], |
| 83 ) | 83 ) |
| 84 step_result.presentation.links['Applied issue %s' % issue_number] = ( | 84 step_result.presentation.links['Applied issue %s' % issue_number] = ( |
| 85 urlparse.urljoin(rietveld_url, str(issue_number))) | 85 urlparse.urljoin(rietveld_url, str(issue_number))) |
| 86 | 86 |
| OLD | NEW |