| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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()) |
| OLD | NEW |