| 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 recipe_engine 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): |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 # when TRYSERVER_PROJECT is present in codereview.settings. | 25 # when TRYSERVER_PROJECT is present in codereview.settings. |
| 26 patch_project = (self.m.properties.get('patch_project') or | 26 patch_project = (self.m.properties.get('patch_project') or |
| 27 self.m.properties.get('project')) | 27 self.m.properties.get('project')) |
| 28 | 28 |
| 29 # Please avoid adding projects into this hard-coded list unless your project | 29 # Please avoid adding projects into this hard-coded list unless your project |
| 30 # CLs are being run by multiple recipes. Instead pass patch_project_roots to | 30 # CLs are being run by multiple recipes. Instead pass patch_project_roots to |
| 31 # ensure_checkout. | 31 # ensure_checkout. |
| 32 patch_project_roots = { | 32 patch_project_roots = { |
| 33 'blink': ['third_party', 'WebKit'], | 33 'blink': ['third_party', 'WebKit'], |
| 34 'v8': ['v8'], | 34 'v8': ['v8'], |
| 35 'build_limited_scripts_slave': ['scripts', 'slave'], |
| 35 } | 36 } |
| 36 | 37 |
| 37 # Make sure to update common projects (above) with extra projects (and not | 38 # Make sure to update common projects (above) with extra projects (and not |
| 38 # vice versa, so that recipes can override default values if needed. | 39 # vice versa, so that recipes can override default values if needed. |
| 39 if extra_patch_project_roots: | 40 if extra_patch_project_roots: |
| 40 patch_project_roots.update(extra_patch_project_roots) | 41 patch_project_roots.update(extra_patch_project_roots) |
| 41 | 42 |
| 42 path_parts = patch_project_roots.get(patch_project) | 43 path_parts = patch_project_roots.get(patch_project) |
| 43 return self.m.path.join(*path_parts) if path_parts else '' | 44 return self.m.path.join(*path_parts) if path_parts else '' |
| 44 | 45 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 self.m.path['depot_tools'].join('apply_issue.py'), [ | 78 self.m.path['depot_tools'].join('apply_issue.py'), [ |
| 78 '-r', self.m.path['checkout'].join(*root_pieces), | 79 '-r', self.m.path['checkout'].join(*root_pieces), |
| 79 '-i', issue_number, | 80 '-i', issue_number, |
| 80 '-p', self.m.properties['patchset'], | 81 '-p', self.m.properties['patchset'], |
| 81 '-s', rietveld_url, | 82 '-s', rietveld_url, |
| 82 '--no-auth'], | 83 '--no-auth'], |
| 83 ) | 84 ) |
| 84 step_result.presentation.links['Applied issue %s' % issue_number] = ( | 85 step_result.presentation.links['Applied issue %s' % issue_number] = ( |
| 85 urlparse.urljoin(rietveld_url, str(issue_number))) | 86 urlparse.urljoin(rietveld_url, str(issue_number))) |
| 86 | 87 |
| OLD | NEW |