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

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

Issue 1917263002: Revert of depot_tools: add infra_paths recipe module for infra-specific paths (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 7 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 | « recipe_modules/rietveld/__init__.py ('k') | recipe_modules/rietveld/example.py » ('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 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 or 'oauth2'. See also apply_issue.py --help (-E and --no-auth options.) 60 or 'oauth2'. See also apply_issue.py --help (-E and --no-auth options.)
61 """ 61 """
62 # TODO(pgervais): replace *root_pieces by a single Path object. 62 # TODO(pgervais): replace *root_pieces by a single Path object.
63 authentication = kwargs.get('authentication', None) 63 authentication = kwargs.get('authentication', None)
64 rietveld_url = self.m.properties['rietveld'] 64 rietveld_url = self.m.properties['rietveld']
65 issue_number = self.m.properties['issue'] 65 issue_number = self.m.properties['issue']
66 66
67 if authentication == 'oauth2': 67 if authentication == 'oauth2':
68 step_result = self.m.python( 68 step_result = self.m.python(
69 'apply_issue', 69 'apply_issue',
70 self.m.infra_paths['depot_tools'].join('apply_issue.py'), [ 70 self.m.path['depot_tools'].join('apply_issue.py'), [
71 '-r', self.m.path['checkout'].join(*root_pieces), 71 '-r', self.m.path['checkout'].join(*root_pieces),
72 '-i', issue_number, 72 '-i', issue_number,
73 '-p', self.m.properties['patchset'], 73 '-p', self.m.properties['patchset'],
74 '-s', rietveld_url, 74 '-s', rietveld_url,
75 '-E', self.m.infra_paths['build'].join( 75 '-E', self.m.path['build'].join('site_config',
76 'site_config', '.rietveld_client_email'), 76 '.rietveld_client_email'),
77 '-k', self.m.infra_paths['build'].join( 77 '-k', self.m.path['build'].join('site_config',
78 'site_config', '.rietveld_secret_key') 78 '.rietveld_secret_key')
79 ], 79 ],
80 ) 80 )
81 81
82 else: 82 else:
83 step_result = self.m.python( 83 step_result = self.m.python(
84 'apply_issue', 84 'apply_issue',
85 self.m.infra_paths['depot_tools'].join('apply_issue.py'), [ 85 self.m.path['depot_tools'].join('apply_issue.py'), [
86 '-r', self.m.path['checkout'].join(*root_pieces), 86 '-r', self.m.path['checkout'].join(*root_pieces),
87 '-i', issue_number, 87 '-i', issue_number,
88 '-p', self.m.properties['patchset'], 88 '-p', self.m.properties['patchset'],
89 '-s', rietveld_url, 89 '-s', rietveld_url,
90 '--no-auth'], 90 '--no-auth'],
91 ) 91 )
92 step_result.presentation.links['Applied issue %s' % issue_number] = ( 92 step_result.presentation.links['Applied issue %s' % issue_number] = (
93 urlparse.urljoin(rietveld_url, str(issue_number))) 93 urlparse.urljoin(rietveld_url, str(issue_number)))
94 94
OLDNEW
« no previous file with comments | « recipe_modules/rietveld/__init__.py ('k') | recipe_modules/rietveld/example.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698