OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2006-2009 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 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 if change_info: | 859 if change_info: |
860 trychange_args.extend(['--name', change_info.name]) | 860 trychange_args.extend(['--name', change_info.name]) |
861 if change_info.issue: | 861 if change_info.issue: |
862 trychange_args.extend(["--issue", str(change_info.issue)]) | 862 trychange_args.extend(["--issue", str(change_info.issue)]) |
863 if change_info.patchset: | 863 if change_info.patchset: |
864 trychange_args.extend(["--patchset", str(change_info.patchset)]) | 864 trychange_args.extend(["--patchset", str(change_info.patchset)]) |
865 trychange_args.extend(args) | 865 trychange_args.extend(args) |
866 file_list = change_info.GetFileNames() | 866 file_list = change_info.GetFileNames() |
867 else: | 867 else: |
868 trychange_args.extend(args) | 868 trychange_args.extend(args) |
869 file_list = None | 869 file_list = [] |
870 return trychange.TryChange( | 870 return trychange.TryChange( |
871 trychange_args, | 871 trychange_args, |
872 file_list=file_list, | 872 file_list=file_list, |
873 swallow_exception=swallow_exception, | 873 swallow_exception=swallow_exception, |
874 prog='gcl try', | 874 prog='gcl try', |
875 extra_epilog='\n' | 875 extra_epilog='\n' |
876 'When called from gcl, use the format gcl try <change_name>.\n') | 876 'When called from gcl, use the format gcl try <change_name>.\n') |
877 | 877 |
878 | 878 |
879 @need_change_and_args | 879 @need_change_and_args |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1336 if e.code != 500: | 1336 if e.code != 500: |
1337 raise | 1337 raise |
1338 print >> sys.stderr, ( | 1338 print >> sys.stderr, ( |
1339 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 1339 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
1340 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) | 1340 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) |
1341 return 1 | 1341 return 1 |
1342 | 1342 |
1343 | 1343 |
1344 if __name__ == "__main__": | 1344 if __name__ == "__main__": |
1345 sys.exit(main(sys.argv[1:])) | 1345 sys.exit(main(sys.argv[1:])) |
OLD | NEW |