OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import ctypes | 5 import ctypes |
6 import ctypes.util | 6 import ctypes.util |
7 import os | 7 import os |
8 import random | 8 import random |
9 import re | 9 import re |
10 import sys | 10 import sys |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 # 'commit-bot@chromium.org', so replace the service account with it. | 498 # 'commit-bot@chromium.org', so replace the service account with it. |
499 name = 'commit-bot@chromium.org' | 499 name = 'commit-bot@chromium.org' |
500 properties['requester'] = name | 500 properties['requester'] = name |
501 | 501 |
502 buildbucket.setup( | 502 buildbucket.setup( |
503 c, | 503 c, |
504 active_master, | 504 active_master, |
505 buckets=[active_master.buildbucket_bucket], | 505 buckets=[active_master.buildbucket_bucket], |
506 build_params_hook=params_hook, | 506 build_params_hook=params_hook, |
507 max_lease_count=buildbucket.NO_LEASE_LIMIT, | 507 max_lease_count=buildbucket.NO_LEASE_LIMIT, |
| 508 unique_change_urls=getattr( |
| 509 active_master, 'buildbucket_unique_change_urls', False), |
508 ) | 510 ) |
509 | 511 |
510 | 512 |
511 def DumpSetup(c, important=None, filename='config.current.txt'): | 513 def DumpSetup(c, important=None, filename='config.current.txt'): |
512 """Writes a flattened version of the setup to a text file. | 514 """Writes a flattened version of the setup to a text file. |
513 Some interesting classes are exploded with their variables | 515 Some interesting classes are exploded with their variables |
514 exposed, by default the BuildFactories and Schedulers. | 516 exposed, by default the BuildFactories and Schedulers. |
515 Newlines and indentation are sprinkled through the representation, | 517 Newlines and indentation are sprinkled through the representation, |
516 to make the output more easily broken up and groked with grep or diff. | 518 to make the output more easily broken up and groked with grep or diff. |
517 | 519 |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
687 # Pad the cmdline string to the required length. If it's longer than the | 689 # Pad the cmdline string to the required length. If it's longer than the |
688 # currentl commandline, truncate it. | 690 # currentl commandline, truncate it. |
689 if len(cmdline) >= cmdlen: | 691 if len(cmdline) >= cmdlen: |
690 new_cmdline = ctypes.c_char_p(cmdline[:cmdlen-1] + '\0') | 692 new_cmdline = ctypes.c_char_p(cmdline[:cmdlen-1] + '\0') |
691 else: | 693 else: |
692 new_cmdline = ctypes.c_char_p(cmdline.ljust(cmdlen, '\0')) | 694 new_cmdline = ctypes.c_char_p(cmdline.ljust(cmdlen, '\0')) |
693 | 695 |
694 # Replace the old commandline. | 696 # Replace the old commandline. |
695 libc = ctypes.CDLL(ctypes.util.find_library('c')) | 697 libc = ctypes.CDLL(ctypes.util.find_library('c')) |
696 libc.memcpy(argv.contents, new_cmdline, cmdlen) | 698 libc.memcpy(argv.contents, new_cmdline, cmdlen) |
OLD | NEW |