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

Side by Side Diff: drover.py

Issue 8360007: Move code starting the editor into a common function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Rebase against HEAD Created 9 years, 2 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 | gcl.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) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 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 import optparse 6 import optparse
7 import os 7 import os
8 import re 8 import re
9 import sys 9 import sys
10 10
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 filename = str(revision)+".txt" 470 filename = str(revision)+".txt"
471 out = open(filename,"w") 471 out = open(filename,"w")
472 out.write(action +" " + str(revision) + " - ") 472 out.write(action +" " + str(revision) + " - ")
473 out.write(getRevisionLog(url, revision)) 473 out.write(getRevisionLog(url, revision))
474 if (author): 474 if (author):
475 out.write("\nTBR=" + author) 475 out.write("\nTBR=" + author)
476 out.close() 476 out.close()
477 477
478 change_cmd = 'change ' + str(revision) + " " + filename 478 change_cmd = 'change ' + str(revision) + " " + filename
479 if options.revertbot: 479 if options.revertbot:
480 change_cmd += ' --silent' 480 if sys.platform == 'win32':
481 os.environ['SVN_EDITOR'] = 'cmd.exe /c exit'
482 else:
483 os.environ['SVN_EDITOR'] = 'true'
481 runGcl(change_cmd) 484 runGcl(change_cmd)
482 os.unlink(filename) 485 os.unlink(filename)
483 486
484 if options.local: 487 if options.local:
485 return 0 488 return 0
486 489
487 print author 490 print author
488 print revision 491 print revision
489 print ("gcl upload " + str(revision) + 492 print ("gcl upload " + str(revision) +
490 " --send_mail --no_presubmit --reviewers=" + author) 493 " --send_mail --no_presubmit --reviewers=" + author)
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 549
547 if options.local and (options.revert or options.branch): 550 if options.local and (options.revert or options.branch):
548 option_parser.error("--local cannot be used with --revert or --branch") 551 option_parser.error("--local cannot be used with --revert or --branch")
549 return 1 552 return 1
550 553
551 return drover(options, args) 554 return drover(options, args)
552 555
553 556
554 if __name__ == "__main__": 557 if __name__ == "__main__":
555 sys.exit(main()) 558 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | gcl.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698