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 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 return ListFiles(True) | 715 return ListFiles(True) |
716 | 716 |
717 | 717 |
718 @need_change_and_args | 718 @need_change_and_args |
719 @attrs(usage='[--no_presubmit] [--clobber] [--no_watchlists]') | 719 @attrs(usage='[--no_presubmit] [--clobber] [--no_watchlists]') |
720 def CMDupload(change_info, args): | 720 def CMDupload(change_info, args): |
721 """Uploads the changelist to the server for review. | 721 """Uploads the changelist to the server for review. |
722 | 722 |
723 This does not submit a try job; use gcl try to submit a try job. | 723 This does not submit a try job; use gcl try to submit a try job. |
724 """ | 724 """ |
| 725 if '-s' in args or '--server' in args: |
| 726 ErrorExit('Don\'t use the -s flag, fix codereview.settings instead') |
725 if not change_info.GetFiles(): | 727 if not change_info.GetFiles(): |
726 print "Nothing to upload, changelist is empty." | 728 print "Nothing to upload, changelist is empty." |
727 return 0 | 729 return 0 |
728 if not OptionallyDoPresubmitChecks(change_info, False, args): | 730 if not OptionallyDoPresubmitChecks(change_info, False, args): |
729 return 1 | 731 return 1 |
730 no_watchlists = (FilterFlag(args, "--no_watchlists") or | 732 no_watchlists = (FilterFlag(args, "--no_watchlists") or |
731 FilterFlag(args, "--no-watchlists")) | 733 FilterFlag(args, "--no-watchlists")) |
732 | 734 |
733 # Map --send-mail to --send_mail | 735 # Map --send-mail to --send_mail |
734 if FilterFlag(args, "--send-mail"): | 736 if FilterFlag(args, "--send-mail"): |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1314 if command: | 1316 if command: |
1315 return command(argv[1:]) | 1317 return command(argv[1:]) |
1316 # Unknown command, try to pass that to svn | 1318 # Unknown command, try to pass that to svn |
1317 return CMDpassthru(argv) | 1319 return CMDpassthru(argv) |
1318 except gclient_utils.Error, e: | 1320 except gclient_utils.Error, e: |
1319 print('Got an exception') | 1321 print('Got an exception') |
1320 print(str(e)) | 1322 print(str(e)) |
1321 | 1323 |
1322 if __name__ == "__main__": | 1324 if __name__ == "__main__": |
1323 sys.exit(main(sys.argv[1:])) | 1325 sys.exit(main(sys.argv[1:])) |
OLD | NEW |