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

Side by Side Diff: apply_issue.py

Issue 202483008: Assume 'master' when remote branch not specified. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Fix apply_issue 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') | checkout.py » ('J')
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(full_dir, None, None, None, None, 164 scm_obj = checkout.GitCheckout(root_dir=full_dir,
165 base_ref=options.base_ref,) 165 project_name=None,
166 remote_branch='master',
167 git_url=None,
168 commit_user=None,
169 base_ref=options.base_ref,
170 post_processors=None)
166 elif scm_type == None: 171 elif scm_type == None:
167 scm_obj = checkout.RawCheckout(full_dir, None, None) 172 scm_obj = checkout.RawCheckout(full_dir, None, None)
168 else: 173 else:
169 parser.error('Couldn\'t determine the scm') 174 parser.error('Couldn\'t determine the scm')
170 175
171 # TODO(maruel): HACK, remove me. 176 # TODO(maruel): HACK, remove me.
172 # When run a build slave, make sure buildbot knows that the checkout was 177 # When run a build slave, make sure buildbot knows that the checkout was
173 # modified. 178 # modified.
174 if options.root_dir == 'src' and getpass.getuser() == 'chrome-bot': 179 if options.root_dir == 'src' and getpass.getuser() == 'chrome-bot':
175 # See sourcedirIsPatched() in: 180 # See sourcedirIsPatched() in:
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 f, options.revision_mapping) 221 f, options.revision_mapping)
217 annotated_gclient.emit_buildprops(revisions) 222 annotated_gclient.emit_buildprops(revisions)
218 223
219 return retcode 224 return retcode
220 return 0 225 return 0
221 226
222 227
223 if __name__ == "__main__": 228 if __name__ == "__main__":
224 fix_encoding.fix_encoding() 229 fix_encoding.fix_encoding()
225 sys.exit(main()) 230 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | checkout.py » ('j') | checkout.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698