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

Side by Side Diff: commit_queue.py

Issue 145173004: Pass empty email & password to ReadOnlyRietveld in dry run of commit queue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/commit-queue
Patch Set: Created 6 years, 11 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 | workdir/README » ('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 """Commit queue executable. 5 """Commit queue executable.
6 6
7 Reuse Rietveld and the Chromium Try Server to process and automatically commit 7 Reuse Rietveld and the Chromium Try Server to process and automatically commit
8 patches. 8 patches.
9 """ 9 """
10 10
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 os.path.join(ROOT_DIR, 'subversion_config')) 217 os.path.join(ROOT_DIR, 'subversion_config'))
218 218
219 url = options.rietveld 219 url = options.rietveld
220 gaia_creds = creds.Credentials(os.path.join(work_dir, '.gaia_pwd')) 220 gaia_creds = creds.Credentials(os.path.join(work_dir, '.gaia_pwd'))
221 if options.dry_run: 221 if options.dry_run:
222 logging.debug('Dry run - skipping SCM check.') 222 logging.debug('Dry run - skipping SCM check.')
223 if options.only_issue: 223 if options.only_issue:
224 parser.error('--only-issue is not supported with dry run') 224 parser.error('--only-issue is not supported with dry run')
225 else: 225 else:
226 print('Using read-only Rietveld') 226 print('Using read-only Rietveld')
227 # Make sure rietveld is not modified. 227 # Make sure rietveld is not modified. Pass empty email and
228 rietveld_obj = rietveld.ReadOnlyRietveld( 228 # password to bypass authentication; this additionally
229 url, 229 # guarantees rietveld will not allow any changes
Paweł Hajdan Jr. 2014/01/23 01:26:08 nit: Add dot at the end of sentence.
Sergey Berezin 2014/01/23 02:00:02 done
230 options.user, 230 rietveld_obj = rietveld.ReadOnlyRietveld(url, email='', password='')
231 gaia_creds.get(options.user),
232 None)
233 else: 231 else:
234 AlertOnUncleanCheckout() 232 AlertOnUncleanCheckout()
235 print('WARNING: The Commit Queue is going to commit stuff') 233 print('WARNING: The Commit Queue is going to commit stuff')
236 if options.only_issue: 234 if options.only_issue:
237 print('Using only issue %d' % options.only_issue) 235 print('Using only issue %d' % options.only_issue)
238 rietveld_obj = OnlyIssueRietveld( 236 rietveld_obj = OnlyIssueRietveld(
239 url, 237 url,
240 options.user, 238 options.user,
241 gaia_creds.get(options.user), 239 gaia_creds.get(options.user),
242 None, 240 None,
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 # CQ generally doesn't exit by itself, but if we ever get here, it looks 388 # CQ generally doesn't exit by itself, but if we ever get here, it looks
391 # like a clean shutdown so remove the landmine file. 389 # like a clean shutdown so remove the landmine file.
392 # TODO(phajdan.jr): Do we ever get here? 390 # TODO(phajdan.jr): Do we ever get here?
393 os.remove(landmine_path) 391 os.remove(landmine_path)
394 return 0 392 return 0
395 393
396 394
397 if __name__ == '__main__': 395 if __name__ == '__main__':
398 fix_encoding.fix_encoding() 396 fix_encoding.fix_encoding()
399 sys.exit(main()) 397 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | workdir/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698