Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 import optparse | 6 import optparse |
| 7 import os | 7 import os |
| 8 import re | 8 import re |
| 9 import string | 9 import string |
| 10 import sys | 10 import sys |
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 588 author = getAuthor(TRUNK_URL, revision) | 588 author = getAuthor(TRUNK_URL, revision) |
| 589 | 589 |
| 590 # Check that the author of the CL is different than the user making | 590 # Check that the author of the CL is different than the user making |
| 591 # the revert. If they're the same, then we'll want to prompt the user | 591 # the revert. If they're the same, then we'll want to prompt the user |
| 592 # for a different reviewer to TBR. | 592 # for a different reviewer to TBR. |
| 593 current_users = getCurrentSVNUsers(BASE_URL) | 593 current_users = getCurrentSVNUsers(BASE_URL) |
| 594 is_self_revert = options.revert and author in current_users | 594 is_self_revert = options.revert and author in current_users |
| 595 | 595 |
| 596 filename = str(revision)+".txt" | 596 filename = str(revision)+".txt" |
| 597 out = open(filename,"w") | 597 out = open(filename,"w") |
| 598 out.write(action +" " + str(revision) + "\n") | 598 drover_title = '%s %s' % (action, revision) |
| 599 for line in getRevisionLog(url, revision).splitlines(): | 599 revision_log = getRevisionLog(url, revision).splitlines() |
| 600 if revision_log: | |
| 601 commit_title = revision_log[0] | |
| 602 if len(commit_title) > 30: | |
|
M-A Ruel
2013/03/11 13:10:27
Isn't 30 a tad short?
Isaac (away)
2013/03/11 17:36:11
In the chromium-dev thread "Git-friendly CL Descri
Isaac (away)
2013/03/11 18:45:04
OK after talking to enne@, it looks like 68 char l
| |
| 603 commit_title = commit_title[:27] + '...' | |
|
M-A Ruel
2013/03/11 13:10:27
I always use '…' instead. So you can use commit_ti
Isaac (away)
2013/03/11 17:36:11
Are there other examples of commits which use unic
M-A Ruel
2013/03/11 17:45:39
(M=79420) ~/src/b/depot_tools> git gs "…"
rietveld
| |
| 604 drover_title += ' "%s"' % commit_title | |
| 605 out.write(drover_title + '\n\n') | |
| 606 for line in revision_log: | |
| 600 out.write('> %s\n' % line) | 607 out.write('> %s\n' % line) |
| 601 if (author): | 608 if author: |
| 602 out.write("\nTBR=" + author) | 609 out.write("\nTBR=" + author) |
| 603 out.close() | 610 out.close() |
| 604 | 611 |
| 605 change_cmd = 'change ' + str(revision) + " " + filename | 612 change_cmd = 'change ' + str(revision) + " " + filename |
| 606 if options.revertbot: | 613 if options.revertbot: |
| 607 if sys.platform == 'win32': | 614 if sys.platform == 'win32': |
| 608 os.environ['SVN_EDITOR'] = 'cmd.exe /c exit' | 615 os.environ['SVN_EDITOR'] = 'cmd.exe /c exit' |
| 609 else: | 616 else: |
| 610 os.environ['SVN_EDITOR'] = 'true' | 617 os.environ['SVN_EDITOR'] = 'true' |
| 611 runGcl(change_cmd) | 618 runGcl(change_cmd) |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 687 | 694 |
| 688 if options.branch and options.milestone: | 695 if options.branch and options.milestone: |
| 689 option_parser.error("--branch cannot be used with --milestone") | 696 option_parser.error("--branch cannot be used with --milestone") |
| 690 return 1 | 697 return 1 |
| 691 | 698 |
| 692 return drover(options, args) | 699 return drover(options, args) |
| 693 | 700 |
| 694 | 701 |
| 695 if __name__ == "__main__": | 702 if __name__ == "__main__": |
| 696 sys.exit(main()) | 703 sys.exit(main()) |
| OLD | NEW |