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.""" | 8 """A git-command for integrating reviews on Rietveld.""" |
9 | 9 |
10 from distutils.version import LooseVersion | 10 from distutils.version import LooseVersion |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 ) | 351 ) |
352 | 352 |
353 _buildbucket_retry( | 353 _buildbucket_retry( |
354 'triggering tryjobs', | 354 'triggering tryjobs', |
355 http, | 355 http, |
356 buildbucket_put_url, | 356 buildbucket_put_url, |
357 'PUT', | 357 'PUT', |
358 body=json.dumps(batch_req_body), | 358 body=json.dumps(batch_req_body), |
359 headers={'Content-Type': 'application/json'} | 359 headers={'Content-Type': 'application/json'} |
360 ) | 360 ) |
| 361 print_text.append('To see results here, run: git cl try-results') |
| 362 print_text.append('To see results in browser, run: git cl web') |
361 print '\n'.join(print_text) | 363 print '\n'.join(print_text) |
362 | 364 |
363 | 365 |
364 def fetch_try_jobs(auth_config, changelist, options): | 366 def fetch_try_jobs(auth_config, changelist, options): |
365 """Fetches tryjobs from buildbucket. | 367 """Fetches tryjobs from buildbucket. |
366 | 368 |
367 Returns a map from build id to build info as json dictionary. | 369 Returns a map from build id to build info as json dictionary. |
368 """ | 370 """ |
369 rietveld_url = settings.GetDefaultServerUrl() | 371 rietveld_url = settings.GetDefaultServerUrl() |
370 rietveld_host = urlparse.urlparse(rietveld_url).hostname | 372 rietveld_host = urlparse.urlparse(rietveld_url).hostname |
(...skipping 3578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3949 if __name__ == '__main__': | 3951 if __name__ == '__main__': |
3950 # These affect sys.stdout so do it outside of main() to simplify mocks in | 3952 # These affect sys.stdout so do it outside of main() to simplify mocks in |
3951 # unit testing. | 3953 # unit testing. |
3952 fix_encoding.fix_encoding() | 3954 fix_encoding.fix_encoding() |
3953 colorama.init() | 3955 colorama.init() |
3954 try: | 3956 try: |
3955 sys.exit(main(sys.argv[1:])) | 3957 sys.exit(main(sys.argv[1:])) |
3956 except KeyboardInterrupt: | 3958 except KeyboardInterrupt: |
3957 sys.stderr.write('interrupted\n') | 3959 sys.stderr.write('interrupted\n') |
3958 sys.exit(1) | 3960 sys.exit(1) |
OLD | NEW |