| OLD | NEW |
| 1 # coding: utf-8 | 1 # coding: utf-8 |
| 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 """Defines class Rietveld to easily access a rietveld instance. | 5 """Defines class Rietveld to easily access a rietveld instance. |
| 6 | 6 |
| 7 Security implications: | 7 Security implications: |
| 8 | 8 |
| 9 The following hypothesis are made: | 9 The following hypothesis are made: |
| 10 - Rietveld enforces: | 10 - Rietveld enforces: |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 | 303 |
| 304 url = '/search?format=json' | 304 url = '/search?format=json' |
| 305 # Sort the keys mainly to ease testing. | 305 # Sort the keys mainly to ease testing. |
| 306 for key in sorted(string_keys): | 306 for key in sorted(string_keys): |
| 307 value = string_keys[key] | 307 value = string_keys[key] |
| 308 if value: | 308 if value: |
| 309 url += '&%s=%s' % (key, urllib2.quote(value)) | 309 url += '&%s=%s' % (key, urllib2.quote(value)) |
| 310 for key in sorted(three_state_keys): | 310 for key in sorted(three_state_keys): |
| 311 value = three_state_keys[key] | 311 value = three_state_keys[key] |
| 312 if value is not None: | 312 if value is not None: |
| 313 url += '&%s=%d' % (key, int(value) + 1) | 313 url += '&%s=%s' % (key, value) |
| 314 | 314 |
| 315 if keys_only: | 315 if keys_only: |
| 316 url += '&keys_only=True' | 316 url += '&keys_only=True' |
| 317 if with_messages: | 317 if with_messages: |
| 318 url += '&with_messages=True' | 318 url += '&with_messages=True' |
| 319 if per_request: | 319 if per_request: |
| 320 url += '&limit=%d' % per_request | 320 url += '&limit=%d' % per_request |
| 321 | 321 |
| 322 cursor = '' | 322 cursor = '' |
| 323 while True: | 323 while True: |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 self, issue, patchset, reason, clobber, revision, builders_and_tests, | 717 self, issue, patchset, reason, clobber, revision, builders_and_tests, |
| 718 master=None, category='cq'): | 718 master=None, category='cq'): |
| 719 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' % | 719 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' % |
| 720 (builders_and_tests, issue)) | 720 (builders_and_tests, issue)) |
| 721 | 721 |
| 722 def trigger_distributed_try_jobs( # pylint:disable=R0201 | 722 def trigger_distributed_try_jobs( # pylint:disable=R0201 |
| 723 self, issue, patchset, reason, clobber, revision, masters, | 723 self, issue, patchset, reason, clobber, revision, masters, |
| 724 category='cq'): | 724 category='cq'): |
| 725 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' % | 725 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' % |
| 726 (masters, issue)) | 726 (masters, issue)) |
| OLD | NEW |