| 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 """\ | 6 """\ |
| 7 Wrapper script around Rietveld's upload.py that simplifies working with groups | 7 Wrapper script around Rietveld's upload.py that simplifies working with groups |
| 8 of files. | 8 of files. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 return '--title' + a[9:] | 840 return '--title' + a[9:] |
| 841 return a | 841 return a |
| 842 args = map(replace_message, args) | 842 args = map(replace_message, args) |
| 843 if found_deprecated_arg[0]: | 843 if found_deprecated_arg[0]: |
| 844 print >> sys.stderr, ( | 844 print >> sys.stderr, ( |
| 845 '\nWARNING: Use -t or --title to set the title of the patchset.\n' | 845 '\nWARNING: Use -t or --title to set the title of the patchset.\n' |
| 846 'In the near future, -m or --message will send a message instead.\n' | 846 'In the near future, -m or --message will send a message instead.\n' |
| 847 'See http://goo.gl/JGg0Z for details.\n') | 847 'See http://goo.gl/JGg0Z for details.\n') |
| 848 | 848 |
| 849 upload_arg = ["upload.py", "-y"] | 849 upload_arg = ["upload.py", "-y"] |
| 850 upload_arg.append("--server=%s" % change_info.rietveld) | 850 upload_arg.append("--server=%s" % change_info.rietveld.encode('utf-8')) |
| 851 | 851 |
| 852 reviewers = change_info.get_reviewers() or output.reviewers | 852 reviewers = change_info.get_reviewers() or output.reviewers |
| 853 if (reviewers and | 853 if (reviewers and |
| 854 not any(arg.startswith('-r') or arg.startswith('--reviewer') for | 854 not any(arg.startswith('-r') or arg.startswith('--reviewer') for |
| 855 arg in args)): | 855 arg in args)): |
| 856 upload_arg.append('--reviewers=%s' % ','.join(reviewers)) | 856 upload_arg.append('--reviewers=%s' % ','.join(reviewers)) |
| 857 | 857 |
| 858 upload_arg.extend(args) | 858 upload_arg.extend(args) |
| 859 | 859 |
| 860 desc_file = None | 860 desc_file = None |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1467 raise | 1467 raise |
| 1468 print >> sys.stderr, ( | 1468 print >> sys.stderr, ( |
| 1469 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 1469 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
| 1470 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) | 1470 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) |
| 1471 return 1 | 1471 return 1 |
| 1472 | 1472 |
| 1473 | 1473 |
| 1474 if __name__ == "__main__": | 1474 if __name__ == "__main__": |
| 1475 fix_encoding.fix_encoding() | 1475 fix_encoding.fix_encoding() |
| 1476 sys.exit(main(sys.argv[1:])) | 1476 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |