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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 def _ParseDepsFile(filename): | 80 def _ParseDepsFile(filename): |
81 with open(filename, 'rb') as f: | 81 with open(filename, 'rb') as f: |
82 deps_content = f.read() | 82 deps_content = f.read() |
83 return _ParseDepsDict(deps_content) | 83 return _ParseDepsDict(deps_content) |
84 | 84 |
85 | 85 |
86 def _ParseDepsDict(deps_content): | 86 def _ParseDepsDict(deps_content): |
87 local_scope = {} | 87 local_scope = {} |
88 var = GClientKeywords.VarImpl({}, local_scope) | 88 var = GClientKeywords.VarImpl({}, local_scope) |
89 global_scope = { | 89 global_scope = { |
90 'File': GClientKeywords.FileImpl, | |
91 'From': GClientKeywords.FromImpl, | 90 'From': GClientKeywords.FromImpl, |
92 'Var': var.Lookup, | 91 'Var': var.Lookup, |
93 'deps_os': {}, | 92 'deps_os': {}, |
94 } | 93 } |
95 exec(deps_content, global_scope, local_scope) | 94 exec(deps_content, global_scope, local_scope) |
96 return local_scope | 95 return local_scope |
97 | 96 |
98 | 97 |
99 def _GenerateCLDescriptionCommand(angle_current, angle_new, bugs, tbr): | 98 def _GenerateCLDescriptionCommand(angle_current, angle_new, bugs, tbr): |
100 def GetChangeString(current_hash, new_hash): | 99 def GetChangeString(current_hash, new_hash): |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 logging.basicConfig(level=logging.ERROR) | 409 logging.basicConfig(level=logging.ERROR) |
411 | 410 |
412 autoroller = AutoRoller(SRC_DIR) | 411 autoroller = AutoRoller(SRC_DIR) |
413 if args.abort: | 412 if args.abort: |
414 return autoroller.Abort() | 413 return autoroller.Abort() |
415 else: | 414 else: |
416 return autoroller.PrepareRoll(args.ignore_checks, args.tbr, args.commit) | 415 return autoroller.PrepareRoll(args.ignore_checks, args.tbr, args.commit) |
417 | 416 |
418 if __name__ == '__main__': | 417 if __name__ == '__main__': |
419 sys.exit(main()) | 418 sys.exit(main()) |
OLD | NEW |