Chromium Code Reviews| Index: mojo/tools/roll/update_from_chromium.py |
| diff --git a/mojo/tools/roll/update_from_chromium.py b/mojo/tools/roll/update_from_chromium.py |
| index 5d2bd4475f757e725a77eb6a82e80bfa4701f4d2..24c46ef31bd4244837093d99e8d3e12206ba0abe 100755 |
| --- a/mojo/tools/roll/update_from_chromium.py |
| +++ b/mojo/tools/roll/update_from_chromium.py |
| @@ -88,6 +88,10 @@ net_dirs = [ |
| files_to_copy = ["sandbox/sandbox_export.h", |
| ".clang-format"] |
| +# The contents of these files before the roll will be preserved after the roll, |
| +# even though they live in directories rolled in from Chromium. |
| +files_not_to_roll = [ "build/config/mojo.gni" ] |
| + |
| dirs = dirs_to_snapshot + net_dirs |
| def chromium_rev_number(src_commit): |
| @@ -123,8 +127,16 @@ def main(): |
| "snapshot of things imported from chromium.") |
| parser.add_argument("chromium_dir", help="chromium source dir") |
| args = parser.parse_args() |
| + pre_roll_commit = system( |
| + ["git", "rev-parse", "HEAD"], cwd=mojo_root_dir).strip() |
| + |
| rev(args.chromium_dir) |
| patch.patch() |
| + |
| + print "Restoring files whose contents don't track Chromium" |
| + for f in files_not_to_roll: |
| + system(["git", "checkout", pre_roll_commit, "--", f], cwd=mojo_root_dir) |
| + commit("Restored pre-roll versions of files that don't get rolled") |
|
jamesr
2015/02/02 21:26:56
commit after the loop (you don't want to commit fo
blundell
2015/02/03 08:29:48
Done.
|
| return 0 |
| if __name__ == "__main__": |