| 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 import argparse | 6 import argparse |
| 7 import json | 7 import json |
| 8 import os | 8 import os |
| 9 import subprocess | 9 import subprocess |
| 10 import sys | 10 import sys |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 "tools/msan", | 71 "tools/msan", |
| 72 "tools/protoc_wrapper", | 72 "tools/protoc_wrapper", |
| 73 "tools/relocation_packer", | 73 "tools/relocation_packer", |
| 74 "tools/valgrind", | 74 "tools/valgrind", |
| 75 "tools/vim", | 75 "tools/vim", |
| 76 "tools/xdisplaycheck", | 76 "tools/xdisplaycheck", |
| 77 "url", | 77 "url", |
| 78 "ui/gl", | 78 "ui/gl", |
| 79 ] | 79 ] |
| 80 | 80 |
| 81 # These directories are temporarily cloned in order to support the network | |
| 82 # bootstrap library until we get that sorted out. | |
| 83 net_dirs = [ | |
| 84 "crypto", | |
| 85 "net"] | |
| 86 | |
| 87 files_to_copy = ["sandbox/sandbox_export.h", | 81 files_to_copy = ["sandbox/sandbox_export.h", |
| 88 ".clang-format"] | 82 ".clang-format"] |
| 89 | 83 |
| 90 # The contents of these files before the roll will be preserved after the roll, | 84 # The contents of these files before the roll will be preserved after the roll, |
| 91 # even though they live in directories rolled in from Chromium. | 85 # even though they live in directories rolled in from Chromium. |
| 92 files_not_to_roll = [ "build/module_args/mojo.gni" ] | 86 files_not_to_roll = [ "build/module_args/mojo.gni" ] |
| 93 | 87 |
| 94 dirs = dirs_to_snapshot + net_dirs | 88 dirs = dirs_to_snapshot |
| 95 | 89 |
| 96 def chromium_rev_number(src_commit): | 90 def chromium_rev_number(src_commit): |
| 97 base_url = "https://cr-rev.appspot.com/_ah/api/crrev/v1/commit/" | 91 base_url = "https://cr-rev.appspot.com/_ah/api/crrev/v1/commit/" |
| 98 commit_info = json.load(urllib2.urlopen(base_url + src_commit)) | 92 commit_info = json.load(urllib2.urlopen(base_url + src_commit)) |
| 99 return commit_info["numberings"][0]["number"] | 93 return commit_info["numberings"][0]["number"] |
| 100 | 94 |
| 101 def rev(source_dir): | 95 def rev(source_dir): |
| 102 for d in dirs: | 96 for d in dirs: |
| 103 print "removing directory %s" % d | 97 print "removing directory %s" % d |
| 104 try: | 98 try: |
| (...skipping 29 matching lines...) Expand all Loading... |
| 134 | 128 |
| 135 print "Restoring files whose contents don't track Chromium" | 129 print "Restoring files whose contents don't track Chromium" |
| 136 for f in files_not_to_roll: | 130 for f in files_not_to_roll: |
| 137 system(["git", "checkout", pre_roll_commit, "--", f], cwd=mojo_root_dir) | 131 system(["git", "checkout", pre_roll_commit, "--", f], cwd=mojo_root_dir) |
| 138 if files_not_to_roll: | 132 if files_not_to_roll: |
| 139 commit("Restored pre-roll versions of files that don't get rolled") | 133 commit("Restored pre-roll versions of files that don't get rolled") |
| 140 return 0 | 134 return 0 |
| 141 | 135 |
| 142 if __name__ == "__main__": | 136 if __name__ == "__main__": |
| 143 sys.exit(main()) | 137 sys.exit(main()) |
| OLD | NEW |