| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 def _ParseDepsFile(filename): | 74 def _ParseDepsFile(filename): |
| 75 with open(filename, 'rb') as f: | 75 with open(filename, 'rb') as f: |
| 76 deps_content = f.read() | 76 deps_content = f.read() |
| 77 return _ParseDepsDict(deps_content) | 77 return _ParseDepsDict(deps_content) |
| 78 | 78 |
| 79 | 79 |
| 80 def _ParseDepsDict(deps_content): | 80 def _ParseDepsDict(deps_content): |
| 81 local_scope = {} | 81 local_scope = {} |
| 82 var = GClientKeywords.VarImpl({}, local_scope) | 82 var = GClientKeywords.VarImpl({}, local_scope) |
| 83 global_scope = { | 83 global_scope = { |
| 84 'From': GClientKeywords.FromImpl, | |
| 85 'Var': var.Lookup, | 84 'Var': var.Lookup, |
| 86 'deps_os': {}, | 85 'deps_os': {}, |
| 87 } | 86 } |
| 88 exec(deps_content, global_scope, local_scope) | 87 exec(deps_content, global_scope, local_scope) |
| 89 return local_scope | 88 return local_scope |
| 90 | 89 |
| 91 | 90 |
| 92 def _GenerateCLDescriptionCommand(angle_current, angle_new, bugs, tbr): | 91 def _GenerateCLDescriptionCommand(angle_current, angle_new, bugs, tbr): |
| 93 def GetChangeString(current_hash, new_hash): | 92 def GetChangeString(current_hash, new_hash): |
| 94 return '%s..%s' % (current_hash[0:7], new_hash[0:7]); | 93 return '%s..%s' % (current_hash[0:7], new_hash[0:7]); |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 logging.basicConfig(level=logging.ERROR) | 392 logging.basicConfig(level=logging.ERROR) |
| 394 | 393 |
| 395 autoroller = AutoRoller(SRC_DIR) | 394 autoroller = AutoRoller(SRC_DIR) |
| 396 if args.abort: | 395 if args.abort: |
| 397 return autoroller.Abort() | 396 return autoroller.Abort() |
| 398 else: | 397 else: |
| 399 return autoroller.PrepareRoll(args.ignore_checks, args.tbr, args.commit) | 398 return autoroller.PrepareRoll(args.ignore_checks, args.tbr, args.commit) |
| 400 | 399 |
| 401 if __name__ == '__main__': | 400 if __name__ == '__main__': |
| 402 sys.exit(main()) | 401 sys.exit(main()) |
| OLD | NEW |