| 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 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1038 if change_info.issue: | 1038 if change_info.issue: |
| 1039 revision = re.compile(".*?\nCommitted revision (\d+)", | 1039 revision = re.compile(".*?\nCommitted revision (\d+)", |
| 1040 re.DOTALL).match(output).group(1) | 1040 re.DOTALL).match(output).group(1) |
| 1041 viewvc_url = GetCodeReviewSetting('VIEW_VC') | 1041 viewvc_url = GetCodeReviewSetting('VIEW_VC') |
| 1042 change_info.description += '\n' | 1042 change_info.description += '\n' |
| 1043 if viewvc_url and revision: | 1043 if viewvc_url and revision: |
| 1044 change_info.description += "\nCommitted: " + viewvc_url + revision | 1044 change_info.description += "\nCommitted: " + viewvc_url + revision |
| 1045 elif revision: | 1045 elif revision: |
| 1046 change_info.description += "\nCommitted: " + revision | 1046 change_info.description += "\nCommitted: " + revision |
| 1047 change_info.CloseIssue() | 1047 change_info.CloseIssue() |
| 1048 props = change_info.RpcServer().get_issue_properties(change_info.issue) | 1048 props = change_info.RpcServer().get_issue_properties( |
| 1049 change_info.issue, False) |
| 1049 patch_num = len(props['patchsets']) | 1050 patch_num = len(props['patchsets']) |
| 1050 comment = "Committed patchset #%d manually as r%s" % (patch_num, revision) | 1051 comment = "Committed patchset #%d manually as r%s" % (patch_num, revision) |
| 1051 comment += ' (presubmit successful).' if not bypassed else '.' | 1052 comment += ' (presubmit successful).' if not bypassed else '.' |
| 1052 change_info.AddComment(comment) | 1053 change_info.AddComment(comment) |
| 1053 return 0 | 1054 return 0 |
| 1054 | 1055 |
| 1055 | 1056 |
| 1056 def CMDchange(args): | 1057 def CMDchange(args): |
| 1057 """Creates or edits a changelist. | 1058 """Creates or edits a changelist. |
| 1058 | 1059 |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1469 raise | 1470 raise |
| 1470 print >> sys.stderr, ( | 1471 print >> sys.stderr, ( |
| 1471 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 1472 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
| 1472 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) | 1473 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) |
| 1473 return 1 | 1474 return 1 |
| 1474 | 1475 |
| 1475 | 1476 |
| 1476 if __name__ == "__main__": | 1477 if __name__ == "__main__": |
| 1477 fix_encoding.fix_encoding() | 1478 fix_encoding.fix_encoding() |
| 1478 sys.exit(main(sys.argv[1:])) | 1479 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |