mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-15 00:46:58 +02:00
This also removes the rw_checkout var as it's not longer changes the affect of whether we use the ssh url or not. Note that this replaces the other CL from last night because the other CL didn't work. The other CL still pulled in the same manifest that has http: url's for each git repo. I reverted that change last night after I noticed this. Change-Id: I3d4ad2be6887ac2cf4ed2009bad9cae6dfdf5bbf BUG=chromium-os:9509 TEST=Ran with cbuildbot --clobber and incremental Review URL: http://codereview.chromium.org/5278010
39 lines
1.3 KiB
Python
Executable File
39 lines
1.3 KiB
Python
Executable File
#!/usr/bin/python
|
|
|
|
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
"""Stop gap sync function until cbuildbot is integrated into all builders"""
|
|
|
|
import cbuildbot_comm
|
|
import cbuildbot
|
|
import optparse
|
|
import sys
|
|
|
|
"""Number of retries to retry repo sync before giving up"""
|
|
_NUMBER_OF_RETRIES = 3
|
|
|
|
def main():
|
|
parser = optparse.OptionParser()
|
|
parser.add_option('-r', '--buildroot',
|
|
help='root directory where sync occurs')
|
|
parser.add_option('-c', '--clobber', action='store_true', default=False,
|
|
help='clobber build directory and do a full checkout')
|
|
parser.add_option('-t', '--tracking_branch', default='cros/master',
|
|
help='Branch to sync against for full checkouts.')
|
|
(options, args) = parser.parse_args()
|
|
if options.buildroot:
|
|
if options.clobber:
|
|
cbuildbot._FullCheckout(options.buildroot, options.tracking_branch,
|
|
retries=_NUMBER_OF_RETRIES)
|
|
else:
|
|
cbuildbot._IncrementalCheckout(options.buildroot,
|
|
retries=_NUMBER_OF_RETRIES)
|
|
else:
|
|
print >> sys.stderr, 'ERROR: Must set buildroot'
|
|
sys.exit(1)
|
|
|
|
if __name__ == '__main__':
|
|
main()
|