| 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 4838 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4849   patchset = options.patchset | 4849   patchset = options.patchset | 
| 4850   if not patchset: | 4850   if not patchset: | 
| 4851     patchset = cl.GetMostRecentPatchset() | 4851     patchset = cl.GetMostRecentPatchset() | 
| 4852     if not patchset: | 4852     if not patchset: | 
| 4853       parser.error('Codereview doesn\'t know about issue %s. ' | 4853       parser.error('Codereview doesn\'t know about issue %s. ' | 
| 4854                    'No access to issue or wrong issue number?\n' | 4854                    'No access to issue or wrong issue number?\n' | 
| 4855                    'Either upload first, or pass --patchset explicitely' % | 4855                    'Either upload first, or pass --patchset explicitely' % | 
| 4856                    cl.GetIssue()) | 4856                    cl.GetIssue()) | 
| 4857 | 4857 | 
| 4858     if patchset != cl.GetPatchset(): | 4858     if patchset != cl.GetPatchset(): | 
| 4859       print('WARNING: Mismatch between local config and server. Did a previous ' | 4859       print('Warning: Codereview server has newer patchsets (%s) than most ' | 
| 4860             'upload fail?\n' | 4860             'recent upload from local checkout (%s). Did a previous upload ' | 
| 4861             'By default, git cl try uses latest patchset from codereview.\n' | 4861             'fail?\n' | 
| 4862             'Continuing using patchset %s.\n' % patchset) | 4862             'By default, git cl try uses latest patchset from codereview, ' | 
|  | 4863             'continuing to use patchset %s.\n' % | 
|  | 4864             (patchset, cl.GetPatchset(), patchset)) | 
| 4863   try: | 4865   try: | 
| 4864     jobs = fetch_try_jobs(auth_config, cl, options.buildbucket_host, patchset) | 4866     jobs = fetch_try_jobs(auth_config, cl, options.buildbucket_host, patchset) | 
| 4865   except BuildbucketResponseException as ex: | 4867   except BuildbucketResponseException as ex: | 
| 4866     print('Buildbucket error: %s' % ex) | 4868     print('Buildbucket error: %s' % ex) | 
| 4867     return 1 | 4869     return 1 | 
| 4868   if options.json: | 4870   if options.json: | 
| 4869     write_try_results_json(options.json, jobs) | 4871     write_try_results_json(options.json, jobs) | 
| 4870   else: | 4872   else: | 
| 4871     print_try_jobs(options, jobs) | 4873     print_try_jobs(options, jobs) | 
| 4872   return 0 | 4874   return 0 | 
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5310 if __name__ == '__main__': | 5312 if __name__ == '__main__': | 
| 5311   # These affect sys.stdout so do it outside of main() to simplify mocks in | 5313   # These affect sys.stdout so do it outside of main() to simplify mocks in | 
| 5312   # unit testing. | 5314   # unit testing. | 
| 5313   fix_encoding.fix_encoding() | 5315   fix_encoding.fix_encoding() | 
| 5314   setup_color.init() | 5316   setup_color.init() | 
| 5315   try: | 5317   try: | 
| 5316     sys.exit(main(sys.argv[1:])) | 5318     sys.exit(main(sys.argv[1:])) | 
| 5317   except KeyboardInterrupt: | 5319   except KeyboardInterrupt: | 
| 5318     sys.stderr.write('interrupted\n') | 5320     sys.stderr.write('interrupted\n') | 
| 5319     sys.exit(1) | 5321     sys.exit(1) | 
| OLD | NEW | 
|---|