OLD | NEW |
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 Loading... |
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 Loading... |
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()) |
OLD | NEW |