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

Side by Side Diff: apply_issue.py

Issue 204013002: Revert making apply_issue assume 'master' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | checkout.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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Applies an issue from Rietveld. 6 """Applies an issue from Rietveld.
7 """ 7 """
8 8
9 import getpass 9 import getpass
10 import json 10 import json
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 options.issue, options.patchset, 154 options.issue, options.patchset,
155 options.server, options.issue) 155 options.server, options.issue)
156 return 1 156 return 1
157 for patch in patchset.patches: 157 for patch in patchset.patches:
158 print(patch) 158 print(patch)
159 full_dir = os.path.abspath(options.root_dir) 159 full_dir = os.path.abspath(options.root_dir)
160 scm_type = scm.determine_scm(full_dir) 160 scm_type = scm.determine_scm(full_dir)
161 if scm_type == 'svn': 161 if scm_type == 'svn':
162 scm_obj = checkout.SvnCheckout(full_dir, None, None, None, None) 162 scm_obj = checkout.SvnCheckout(full_dir, None, None, None, None)
163 elif scm_type == 'git': 163 elif scm_type == 'git':
164 scm_obj = checkout.GitCheckout(root_dir=full_dir, 164 scm_obj = checkout.GitCheckout(full_dir, None, None, None, None,
165 project_name=None, 165 base_ref=options.base_ref,)
M-A Ruel 2014/03/19 00:55:23 I think I prefer the named arguments, since it's a
166 remote_branch='master',
167 git_url=None,
168 commit_user=None,
169 base_ref=options.base_ref,
170 post_processors=None)
171 elif scm_type == None: 166 elif scm_type == None:
172 scm_obj = checkout.RawCheckout(full_dir, None, None) 167 scm_obj = checkout.RawCheckout(full_dir, None, None)
173 else: 168 else:
174 parser.error('Couldn\'t determine the scm') 169 parser.error('Couldn\'t determine the scm')
175 170
176 # TODO(maruel): HACK, remove me. 171 # TODO(maruel): HACK, remove me.
177 # When run a build slave, make sure buildbot knows that the checkout was 172 # When run a build slave, make sure buildbot knows that the checkout was
178 # modified. 173 # modified.
179 if options.root_dir == 'src' and getpass.getuser() == 'chrome-bot': 174 if options.root_dir == 'src' and getpass.getuser() == 'chrome-bot':
180 # See sourcedirIsPatched() in: 175 # See sourcedirIsPatched() in:
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 f, options.revision_mapping) 216 f, options.revision_mapping)
222 annotated_gclient.emit_buildprops(revisions) 217 annotated_gclient.emit_buildprops(revisions)
223 218
224 return retcode 219 return retcode
225 return 0 220 return 0
226 221
227 222
228 if __name__ == "__main__": 223 if __name__ == "__main__":
229 fix_encoding.fix_encoding() 224 fix_encoding.fix_encoding()
230 sys.exit(main()) 225 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | checkout.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698