| 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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1393 if e.code != 500: | 1392 if e.code != 500: |
| 1394 raise | 1393 raise |
| 1395 print >> sys.stderr, ( | 1394 print >> sys.stderr, ( |
| 1396 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 1395 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
| 1397 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) | 1396 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) |
| 1398 return 1 | 1397 return 1 |
| 1399 | 1398 |
| 1400 | 1399 |
| 1401 if __name__ == "__main__": | 1400 if __name__ == "__main__": |
| 1402 sys.exit(main(sys.argv[1:])) | 1401 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |