OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 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 import argparse | 6 import argparse |
7 import collections | 7 import collections |
8 import logging | 8 import logging |
9 import os | 9 import os |
10 import re | 10 import re |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 def _ParseDepsFile(filename): | 89 def _ParseDepsFile(filename): |
90 with open(filename, 'rb') as f: | 90 with open(filename, 'rb') as f: |
91 deps_content = f.read() | 91 deps_content = f.read() |
92 return _ParseDepsDict(deps_content) | 92 return _ParseDepsDict(deps_content) |
93 | 93 |
94 | 94 |
95 def _ParseDepsDict(deps_content): | 95 def _ParseDepsDict(deps_content): |
96 local_scope = {} | 96 local_scope = {} |
97 var = GClientKeywords.VarImpl({}, local_scope) | 97 var = GClientKeywords.VarImpl({}, local_scope) |
98 global_scope = { | 98 global_scope = { |
99 # 'From': GClientKeywords.FromImpl, | |
100 'Var': var.Lookup, | 99 'Var': var.Lookup, |
101 'deps_os': {}, | 100 'deps_os': {}, |
102 } | 101 } |
103 exec(deps_content, global_scope, local_scope) | 102 exec(deps_content, global_scope, local_scope) |
104 return local_scope | 103 return local_scope |
105 | 104 |
106 | 105 |
107 def _WaitForTrybots(issue, rietveld_server): | 106 def _WaitForTrybots(issue, rietveld_server): |
108 """Wait until all trybots have passed or at least one have failed. | 107 """Wait until all trybots have passed or at least one have failed. |
109 | 108 |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 if args.abort: | 427 if args.abort: |
429 return autoroller.Abort() | 428 return autoroller.Abort() |
430 elif args.wait_for_trybots: | 429 elif args.wait_for_trybots: |
431 return autoroller.WaitForTrybots() | 430 return autoroller.WaitForTrybots() |
432 else: | 431 else: |
433 return autoroller.PrepareRoll(args.dry_run, args.ignore_checks, | 432 return autoroller.PrepareRoll(args.dry_run, args.ignore_checks, |
434 args.no_commit, args.close_previous_roll) | 433 args.no_commit, args.close_previous_roll) |
435 | 434 |
436 if __name__ == '__main__': | 435 if __name__ == '__main__': |
437 sys.exit(main()) | 436 sys.exit(main()) |
OLD | NEW |