Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(324)

Side by Side Diff: bin/cros_repo_sync_all.py

Issue 4128007: Adding tracking branch broke repo sync on full builders. (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: Fix parse args Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 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 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Stop gap sync function until cbuildbot is integrated into all builders""" 7 """Stop gap sync function until cbuildbot is integrated into all builders"""
8 8
9 import cbuildbot_comm 9 import cbuildbot_comm
10 import cbuildbot 10 import cbuildbot
11 import optparse 11 import optparse
12 import sys 12 import sys
13 13
14 """Number of retries to retry repo sync before giving up""" 14 """Number of retries to retry repo sync before giving up"""
15 _NUMBER_OF_RETRIES=3 15 _NUMBER_OF_RETRIES = 3
16 16
17 def main(): 17 def main():
18 parser = optparse.OptionParser() 18 parser = optparse.OptionParser()
19 parser.add_option('-r', '--buildroot', 19 parser.add_option('-r', '--buildroot',
20 help='root directory where sync occurs') 20 help='root directory where sync occurs')
21 parser.add_option('-c', '--clobber', action='store_true', default=False, 21 parser.add_option('-c', '--clobber', action='store_true', default=False,
22 help='clobber build directory and do a full checkout') 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.')
23 (options, args) = parser.parse_args() 25 (options, args) = parser.parse_args()
24 if options.buildroot: 26 if options.buildroot:
25 if options.clobber: 27 if options.clobber:
26 cbuildbot._FullCheckout(options.buildroot, rw_checkout=False, 28 cbuildbot._FullCheckout(options.buildroot, options.tracking_branch,
27 retries=_NUMBER_OF_RETRIES) 29 rw_checkout=False, retries=_NUMBER_OF_RETRIES)
28 else: 30 else:
29 cbuildbot._IncrementalCheckout(options.buildroot, rw_checkout=False, 31 cbuildbot._IncrementalCheckout(options.buildroot, rw_checkout=False,
30 retries=_NUMBER_OF_RETRIES) 32 retries=_NUMBER_OF_RETRIES)
31 else: 33 else:
32 print >>sys.stderr, 'ERROR: Must set buildroot' 34 print >> sys.stderr, 'ERROR: Must set buildroot'
33 sys.exit(1) 35 sys.exit(1)
34 36
35 if __name__ == '__main__': 37 if __name__ == '__main__':
36 main() 38 main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698