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 """\ | 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 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
954 ErrorExit("You need to install trychange.py to use the try server.") | 954 ErrorExit("You need to install trychange.py to use the try server.") |
955 | 955 |
956 trychange_args = [] | 956 trychange_args = [] |
957 if change_info: | 957 if change_info: |
958 trychange_args.extend(['--name', change_info.name]) | 958 trychange_args.extend(['--name', change_info.name]) |
959 if change_info.issue: | 959 if change_info.issue: |
960 trychange_args.extend(["--issue", str(change_info.issue)]) | 960 trychange_args.extend(["--issue", str(change_info.issue)]) |
961 if change_info.patchset: | 961 if change_info.patchset: |
962 trychange_args.extend(["--patchset", str(change_info.patchset)]) | 962 trychange_args.extend(["--patchset", str(change_info.patchset)]) |
963 file_list = change_info.GetFileNames() | 963 file_list = change_info.GetFileNames() |
| 964 change = presubmit_support.SvnChange(change_info.name, |
| 965 change_info.description, |
| 966 change_info.GetLocalRoot(), |
| 967 change_info.GetFiles(), |
| 968 change_info.issue, |
| 969 change_info.patchset, |
| 970 None) |
964 else: | 971 else: |
965 file_list = [] | 972 file_list = [] |
| 973 change = None |
| 974 |
966 trychange_args.extend(args) | 975 trychange_args.extend(args) |
967 return trychange.TryChange( | 976 return trychange.TryChange( |
968 trychange_args, | 977 trychange_args, |
| 978 change=change, |
969 file_list=file_list, | 979 file_list=file_list, |
970 swallow_exception=swallow_exception, | 980 swallow_exception=swallow_exception, |
971 prog='gcl try', | 981 prog='gcl try', |
972 extra_epilog='\n' | 982 extra_epilog='\n' |
973 'When called from gcl, use the format gcl try <change_name>.\n') | 983 'When called from gcl, use the format gcl try <change_name>.\n') |
974 | 984 |
975 | 985 |
976 @need_change_and_args | 986 @need_change_and_args |
977 @attrs(usage='[--no_presubmit]') | 987 @attrs(usage='[--no_presubmit]') |
978 def CMDcommit(change_info, args): | 988 def CMDcommit(change_info, args): |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1470 raise | 1480 raise |
1471 print >> sys.stderr, ( | 1481 print >> sys.stderr, ( |
1472 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 1482 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
1473 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) | 1483 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) |
1474 return 1 | 1484 return 1 |
1475 | 1485 |
1476 | 1486 |
1477 if __name__ == "__main__": | 1487 if __name__ == "__main__": |
1478 fix_encoding.fix_encoding() | 1488 fix_encoding.fix_encoding() |
1479 sys.exit(main(sys.argv[1:])) | 1489 sys.exit(main(sys.argv[1:])) |
OLD | NEW |