OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2010 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 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 return 1 | 909 return 1 |
910 ErrorExit("You need to install trychange.py to use the try server.") | 910 ErrorExit("You need to install trychange.py to use the try server.") |
911 | 911 |
912 trychange_args = [] | 912 trychange_args = [] |
913 if change_info: | 913 if change_info: |
914 trychange_args.extend(['--name', change_info.name]) | 914 trychange_args.extend(['--name', change_info.name]) |
915 if change_info.issue: | 915 if change_info.issue: |
916 trychange_args.extend(["--issue", str(change_info.issue)]) | 916 trychange_args.extend(["--issue", str(change_info.issue)]) |
917 if change_info.patchset: | 917 if change_info.patchset: |
918 trychange_args.extend(["--patchset", str(change_info.patchset)]) | 918 trychange_args.extend(["--patchset", str(change_info.patchset)]) |
919 trychange_args.extend(args) | |
920 file_list = change_info.GetFileNames() | 919 file_list = change_info.GetFileNames() |
921 else: | 920 else: |
922 trychange_args.extend(args) | |
923 file_list = [] | 921 file_list = [] |
| 922 trychange_args.extend(args) |
924 return trychange.TryChange( | 923 return trychange.TryChange( |
925 trychange_args, | 924 trychange_args, |
926 file_list=file_list, | 925 file_list=file_list, |
927 swallow_exception=swallow_exception, | 926 swallow_exception=swallow_exception, |
928 prog='gcl try', | 927 prog='gcl try', |
929 extra_epilog='\n' | 928 extra_epilog='\n' |
930 'When called from gcl, use the format gcl try <change_name>.\n') | 929 'When called from gcl, use the format gcl try <change_name>.\n') |
931 | 930 |
932 | 931 |
933 @need_change_and_args | 932 @need_change_and_args |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1399 if e.code != 500: | 1398 if e.code != 500: |
1400 raise | 1399 raise |
1401 print >> sys.stderr, ( | 1400 print >> sys.stderr, ( |
1402 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 1401 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
1403 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) | 1402 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) |
1404 return 1 | 1403 return 1 |
1405 | 1404 |
1406 | 1405 |
1407 if __name__ == "__main__": | 1406 if __name__ == "__main__": |
1408 sys.exit(main(sys.argv[1:])) | 1407 sys.exit(main(sys.argv[1:])) |
OLD | NEW |