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

Side by Side Diff: scripts/slave/bot_update.py

Issue 1304903007: Bot_update - Branch detection fix (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 5 years, 3 months 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
« 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/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 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 5
6 # TODO(hinoka): Use logging. 6 # TODO(hinoka): Use logging.
7 7
8 import cStringIO 8 import cStringIO
9 import codecs 9 import codecs
10 import collections 10 import collections
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 480
481 def maybe_ignore_revision(revision, buildspec): 481 def maybe_ignore_revision(revision, buildspec):
482 """Handle builders that don't care what buildbot tells them to build. 482 """Handle builders that don't care what buildbot tells them to build.
483 483
484 This is especially the case with branch builders that build from buildspecs 484 This is especially the case with branch builders that build from buildspecs
485 and/or trigger off multiple repositories, where the --revision passed in has 485 and/or trigger off multiple repositories, where the --revision passed in has
486 nothing to do with the solution being built. Clearing the revision in this 486 nothing to do with the solution being built. Clearing the revision in this
487 case causes bot_update to use HEAD rather that trying to checkout an 487 case causes bot_update to use HEAD rather that trying to checkout an
488 inappropriate version of the solution. 488 inappropriate version of the solution.
489 """ 489 """
490 if buildspec and buildspec.container == 'branch': 490 if buildspec and buildspec.container == 'branches':
491 return [] 491 return []
492 return revision 492 return revision
493 493
494 494
495 def solutions_printer(solutions): 495 def solutions_printer(solutions):
496 """Prints gclient solution to stdout.""" 496 """Prints gclient solution to stdout."""
497 print 'Gclient Solutions' 497 print 'Gclient Solutions'
498 print '=================' 498 print '================='
499 for solution in solutions: 499 for solution in solutions:
500 name = solution.get('name') 500 name = solution.get('name')
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1638 except Exception: 1638 except Exception:
1639 # Unexpected failure. 1639 # Unexpected failure.
1640 emit_flag(options.flag_file) 1640 emit_flag(options.flag_file)
1641 raise 1641 raise
1642 else: 1642 else:
1643 emit_flag(options.flag_file) 1643 emit_flag(options.flag_file)
1644 1644
1645 1645
1646 if __name__ == '__main__': 1646 if __name__ == '__main__':
1647 sys.exit(main()) 1647 sys.exit(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