| OLD | NEW |
| (Empty) |
| 1 #!/usr/bin/python | |
| 2 | |
| 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | |
| 4 # Use of this source code is governed by a BSD-style license that can be | |
| 5 # found in the LICENSE file. | |
| 6 | |
| 7 """Stop gap sync function until cbuildbot is integrated into all builders""" | |
| 8 | |
| 9 import cbuildbot_comm | |
| 10 import cbuildbot | |
| 11 import optparse | |
| 12 import sys | |
| 13 | |
| 14 """Number of retries to retry repo sync before giving up""" | |
| 15 _NUMBER_OF_RETRIES = 3 | |
| 16 | |
| 17 def main(): | |
| 18 parser = optparse.OptionParser() | |
| 19 parser.add_option('-r', '--buildroot', | |
| 20 help='root directory where sync occurs') | |
| 21 parser.add_option('-c', '--clobber', action='store_true', default=False, | |
| 22 help='clobber build directory and do a full checkout') | |
| 23 parser.add_option('-t', '--tracking_branch', default='cros/master', | |
| 24 help='Branch to sync against for full checkouts.') | |
| 25 (options, args) = parser.parse_args() | |
| 26 if options.buildroot: | |
| 27 if options.clobber: | |
| 28 cbuildbot._FullCheckout(options.buildroot, options.tracking_branch, | |
| 29 retries=_NUMBER_OF_RETRIES) | |
| 30 else: | |
| 31 cbuildbot._IncrementalCheckout(options.buildroot, | |
| 32 retries=_NUMBER_OF_RETRIES) | |
| 33 else: | |
| 34 print >> sys.stderr, 'ERROR: Must set buildroot' | |
| 35 sys.exit(1) | |
| 36 | |
| 37 if __name__ == '__main__': | |
| 38 main() | |
| OLD | NEW |