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 os | 6 import os |
7 import subprocess | 7 import subprocess |
8 from utils import commit | 8 from utils import commit |
9 from utils import mojo_root_dir | 9 from utils import mojo_root_dir |
10 from utils import system | 10 from utils import system |
11 | 11 |
12 # These directories are snapshotted from chromium without modifications. | 12 # These directories are snapshotted from chromium without modifications. |
13 dirs_to_snapshot = [ | 13 dirs_to_snapshot = [ |
14 "base", | 14 "base", |
15 "build", | 15 "build", |
16 "cc", | 16 "cc", |
17 "gpu", | 17 "gpu", |
18 "ppapi/generators", | 18 "ppapi/generators", |
| 19 "sandbox/linux", |
19 "sdch", | 20 "sdch", |
20 "skia", | 21 "skia", |
21 "testing", | 22 "testing", |
22 "third_party/android_testrunner", | 23 "third_party/android_testrunner", |
23 "third_party/ashmem", | 24 "third_party/ashmem", |
24 "third_party/binutils", | 25 "third_party/binutils", |
25 "third_party/boringssl", | 26 "third_party/boringssl", |
26 "third_party/brotli", | 27 "third_party/brotli", |
| 28 "third_party/checkstyle", |
27 "third_party/cython", | 29 "third_party/cython", |
28 "third_party/fontconfig", | 30 "third_party/fontconfig", |
29 "third_party/freetype2", | 31 "third_party/freetype2", |
30 "third_party/harfbuzz-ng", | 32 "third_party/harfbuzz-ng", |
31 "third_party/iccjpeg", | 33 "third_party/iccjpeg", |
32 "third_party/jinja2", | 34 "third_party/jinja2", |
33 "third_party/jstemplate", | 35 "third_party/jstemplate", |
34 "third_party/khronos", | 36 "third_party/khronos", |
35 "third_party/libXNVCtrl", | 37 "third_party/libXNVCtrl", |
36 "third_party/libevent", | 38 "third_party/libevent", |
(...skipping 19 matching lines...) Expand all Loading... |
56 "tools/generate_library_loader", | 58 "tools/generate_library_loader", |
57 "tools/git", | 59 "tools/git", |
58 "tools/gritsettings", | 60 "tools/gritsettings", |
59 "tools/idl_parser", | 61 "tools/idl_parser", |
60 "tools/json_comment_eater", | 62 "tools/json_comment_eater", |
61 "tools/json_schema_compiler", | 63 "tools/json_schema_compiler", |
62 "tools/linux", | 64 "tools/linux", |
63 "tools/lsan", | 65 "tools/lsan", |
64 "tools/msan", | 66 "tools/msan", |
65 "tools/protoc_wrapper", | 67 "tools/protoc_wrapper", |
| 68 "tools/relocation_packer", |
66 "tools/valgrind", | 69 "tools/valgrind", |
67 "tools/vim", | 70 "tools/vim", |
68 "tools/xdisplaycheck", | 71 "tools/xdisplaycheck", |
69 "url", | 72 "url", |
| 73 "ui/gl", |
70 ] | 74 ] |
71 | 75 |
72 # These directories are temporarily cloned in order to support the network | 76 # These directories are temporarily cloned in order to support the network |
73 # bootstrap library until we get that sorted out. | 77 # bootstrap library until we get that sorted out. |
74 net_dirs = ["crypto", | 78 net_dirs = ["crypto", |
75 "gin", | 79 "gin", |
76 "net", | 80 "net", |
77 ] | 81 ] |
78 | 82 |
| 83 files_to_copy = ["sandbox/sandbox_export.h"] |
| 84 |
79 dirs = dirs_to_snapshot + net_dirs | 85 dirs = dirs_to_snapshot + net_dirs |
80 | 86 |
81 def rev(source_dir): | 87 def rev(source_dir): |
82 os.chdir(source_dir) | 88 os.chdir(source_dir) |
83 src_commit = system(["git", "show-ref", "HEAD"]) | 89 src_commit = system(["git", "show-ref", "HEAD"]) |
84 | 90 |
85 for d in dirs: | 91 for d in dirs: |
86 print "removing directory %s" % d | 92 print "removing directory %s" % d |
87 os.chdir(mojo_root_dir) | 93 os.chdir(mojo_root_dir) |
88 try: | 94 try: |
89 system(["git", "rm", "-r", d]) | 95 system(["git", "rm", "-r", d]) |
90 except subprocess.CheckProcessError: | 96 except subprocess.CalledProcessError: |
91 print "Could not remove %s" % d | 97 print "Could not remove %s" % d |
92 print "cloning directory %s" % d | 98 print "cloning directory %s" % d |
93 os.chdir(source_dir) | 99 os.chdir(source_dir) |
94 files = system(["git", "ls-files", d]) | 100 files = system(["git", "ls-files", d]) |
95 for f in files.splitlines(): | 101 for f in files.splitlines(): |
96 dest_path = os.path.join(mojo_root_dir, f) | 102 dest_path = os.path.join(mojo_root_dir, f) |
97 system(["mkdir", "-p", os.path.dirname(dest_path)]) | 103 system(["mkdir", "-p", os.path.dirname(dest_path)]) |
98 system(["cp", os.path.join(source_dir, f), dest_path]) | 104 system(["cp", os.path.join(source_dir, f), dest_path]) |
99 os.chdir(mojo_root_dir) | 105 os.chdir(mojo_root_dir) |
100 system(["git", "add", d]) | 106 system(["git", "add", d]) |
101 | 107 |
| 108 for f in files_to_copy: |
| 109 system(["cp", os.path.join(source_dir, f), os.path.join(mojo_root_dir, f)]) |
| 110 |
102 os.chdir(mojo_root_dir) | 111 os.chdir(mojo_root_dir) |
103 system(["git", "add", "."]) | 112 system(["git", "add", "."]) |
104 commit("Update from chromium " + src_commit) | 113 commit("Update from chromium " + src_commit) |
OLD | NEW |