| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 # Copyright (C) 2008 Evan Martin <martine@danga.com> | 6 # Copyright (C) 2008 Evan Martin <martine@danga.com> |
| 7 | 7 |
| 8 """A git-command for integrating reviews on Rietveld and Gerrit.""" | 8 """A git-command for integrating reviews on Rietveld and Gerrit.""" |
| 9 | 9 |
| 10 from __future__ import print_function | 10 from __future__ import print_function |
| (...skipping 4781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4792 parser.error('Need to upload first') | 4792 parser.error('Need to upload first') |
| 4793 | 4793 |
| 4794 if cl.IsGerrit(): | 4794 if cl.IsGerrit(): |
| 4795 parser.error( | 4795 parser.error( |
| 4796 'Not yet supported for Gerrit (http://crbug.com/599931).\n' | 4796 'Not yet supported for Gerrit (http://crbug.com/599931).\n' |
| 4797 'If your project has Commit Queue, dry run is a workaround:\n' | 4797 'If your project has Commit Queue, dry run is a workaround:\n' |
| 4798 ' git cl set-commit --dry-run') | 4798 ' git cl set-commit --dry-run') |
| 4799 | 4799 |
| 4800 error_message = cl.CannotTriggerTryJobReason() | 4800 error_message = cl.CannotTriggerTryJobReason() |
| 4801 if error_message: | 4801 if error_message: |
| 4802 parser.error('Can\'t trigger try jobs: %s') | 4802 parser.error('Can\'t trigger try jobs: %s' % error_message) |
| 4803 | 4803 |
| 4804 if not options.name: | 4804 if not options.name: |
| 4805 options.name = cl.GetBranch() | 4805 options.name = cl.GetBranch() |
| 4806 | 4806 |
| 4807 if options.bucket and options.master: | 4807 if options.bucket and options.master: |
| 4808 parser.error('Only one of --bucket and --master may be used.') | 4808 parser.error('Only one of --bucket and --master may be used.') |
| 4809 | 4809 |
| 4810 if options.bot and not options.master and not options.bucket: | 4810 if options.bot and not options.master and not options.bucket: |
| 4811 options.master, err_msg = GetBuilderMaster(options.bot) | 4811 options.master, err_msg = GetBuilderMaster(options.bot) |
| 4812 if err_msg: | 4812 if err_msg: |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5414 if __name__ == '__main__': | 5414 if __name__ == '__main__': |
| 5415 # These affect sys.stdout so do it outside of main() to simplify mocks in | 5415 # These affect sys.stdout so do it outside of main() to simplify mocks in |
| 5416 # unit testing. | 5416 # unit testing. |
| 5417 fix_encoding.fix_encoding() | 5417 fix_encoding.fix_encoding() |
| 5418 setup_color.init() | 5418 setup_color.init() |
| 5419 try: | 5419 try: |
| 5420 sys.exit(main(sys.argv[1:])) | 5420 sys.exit(main(sys.argv[1:])) |
| 5421 except KeyboardInterrupt: | 5421 except KeyboardInterrupt: |
| 5422 sys.stderr.write('interrupted\n') | 5422 sys.stderr.write('interrupted\n') |
| 5423 sys.exit(1) | 5423 sys.exit(1) |
| OLD | NEW |