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 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1024 finally: | 1024 finally: |
1025 os.remove(commit_filename) | 1025 os.remove(commit_filename) |
1026 finally: | 1026 finally: |
1027 os.remove(targets_filename) | 1027 os.remove(targets_filename) |
1028 if output.find("Committed revision") != -1: | 1028 if output.find("Committed revision") != -1: |
1029 change_info.Delete() | 1029 change_info.Delete() |
1030 | 1030 |
1031 if change_info.issue: | 1031 if change_info.issue: |
1032 revision = re.compile(".*?\nCommitted revision (\d+)", | 1032 revision = re.compile(".*?\nCommitted revision (\d+)", |
1033 re.DOTALL).match(output).group(1) | 1033 re.DOTALL).match(output).group(1) |
1034 viewvc_url = gclient_utils.UpgradeToHttps(GetCodeReviewSetting('VIEW_VC')) | 1034 viewvc_url = GetCodeReviewSetting('VIEW_VC') |
1035 change_info.description += '\n' | 1035 change_info.description += '\n' |
1036 if viewvc_url and revision: | 1036 if viewvc_url and revision: |
1037 change_info.description += "\nCommitted: " + viewvc_url + revision | 1037 change_info.description += "\nCommitted: " + viewvc_url + revision |
1038 elif revision: | 1038 elif revision: |
1039 change_info.description += "\nCommitted: " + revision | 1039 change_info.description += "\nCommitted: " + revision |
1040 change_info.CloseIssue() | 1040 change_info.CloseIssue() |
1041 return 0 | 1041 return 0 |
1042 | 1042 |
1043 | 1043 |
1044 def CMDchange(args): | 1044 def CMDchange(args): |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1457 raise | 1457 raise |
1458 print >> sys.stderr, ( | 1458 print >> sys.stderr, ( |
1459 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 1459 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
1460 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) | 1460 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) |
1461 return 1 | 1461 return 1 |
1462 | 1462 |
1463 | 1463 |
1464 if __name__ == "__main__": | 1464 if __name__ == "__main__": |
1465 fix_encoding.fix_encoding() | 1465 fix_encoding.fix_encoding() |
1466 sys.exit(main(sys.argv[1:])) | 1466 sys.exit(main(sys.argv[1:])) |
OLD | NEW |