OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
3 # | 3 # |
4 # Use of this source code is governed by a BSD-style license | 4 # Use of this source code is governed by a BSD-style license |
5 # that can be found in the LICENSE file in the root of the source | 5 # that can be found in the LICENSE file in the root of the source |
6 # tree. An additional intellectual property rights grant can be found | 6 # tree. An additional intellectual property rights grant can be found |
7 # in the file PATENTS. All contributing project authors may | 7 # in the file PATENTS. All contributing project authors may |
8 # be found in the AUTHORS file in the root of the source tree. | 8 # be found in the AUTHORS file in the root of the source tree. |
9 | 9 |
10 """Script to roll chromium_revision in the WebRTC DEPS file.""" | 10 """Script to roll chromium_revision in the WebRTC DEPS file.""" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 'path url current_rev new_rev') | 49 'path url current_rev new_rev') |
50 | 50 |
51 class RollError(Exception): | 51 class RollError(Exception): |
52 pass | 52 pass |
53 | 53 |
54 | 54 |
55 def ParseDepsDict(deps_content): | 55 def ParseDepsDict(deps_content): |
56 local_scope = {} | 56 local_scope = {} |
57 var = GClientKeywords.VarImpl({}, local_scope) | 57 var = GClientKeywords.VarImpl({}, local_scope) |
58 global_scope = { | 58 global_scope = { |
59 'File': GClientKeywords.FileImpl, | |
60 'From': GClientKeywords.FromImpl, | 59 'From': GClientKeywords.FromImpl, |
61 'Var': var.Lookup, | 60 'Var': var.Lookup, |
62 'deps_os': {}, | 61 'deps_os': {}, |
63 } | 62 } |
64 exec(deps_content, global_scope, local_scope) | 63 exec(deps_content, global_scope, local_scope) |
65 return local_scope | 64 return local_scope |
66 | 65 |
67 | 66 |
68 def ParseLocalDepsFile(filename): | 67 def ParseLocalDepsFile(filename): |
69 with open(filename, 'rb') as f: | 68 with open(filename, 'rb') as f: |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 _CreateRollBranch(opts.dry_run) | 436 _CreateRollBranch(opts.dry_run) |
438 UpdateDeps(deps_filename, current_cr_rev, new_cr_rev) | 437 UpdateDeps(deps_filename, current_cr_rev, new_cr_rev) |
439 _LocalCommit(commit_msg, opts.dry_run) | 438 _LocalCommit(commit_msg, opts.dry_run) |
440 _UploadCL(opts.dry_run, opts.rietveld_email) | 439 _UploadCL(opts.dry_run, opts.rietveld_email) |
441 _SendToCQ(opts.dry_run, opts.skip_cq) | 440 _SendToCQ(opts.dry_run, opts.skip_cq) |
442 return 0 | 441 return 0 |
443 | 442 |
444 | 443 |
445 if __name__ == '__main__': | 444 if __name__ == '__main__': |
446 sys.exit(main()) | 445 sys.exit(main()) |
OLD | NEW |