Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: mojo/tools/roll/update_from_chromium.py

Issue 1180693002: Update from https://crrev.com/333737 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/tools/roll/sanitizers_build.patch ('k') | sandbox/linux/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 "third_party/cython", 50 "third_party/cython",
51 ] 51 ]
52 52
53 # These directories are snapshotted from chromium without modifications. 53 # These directories are snapshotted from chromium without modifications.
54 dirs_to_snapshot = base_deps + build_deps + sandbox_deps + mojo_sdk_deps 54 dirs_to_snapshot = base_deps + build_deps + sandbox_deps + mojo_sdk_deps
55 55
56 files_to_copy = [ "sandbox/sandbox_export.h" ] 56 files_to_copy = [ "sandbox/sandbox_export.h" ]
57 57
58 # The contents of these files before the roll will be preserved after the roll, 58 # The contents of these files before the roll will be preserved after the roll,
59 # even though they live in directories rolled in from Chromium. 59 # even though they live in directories rolled in from Chromium.
60 files_not_to_roll = [ "build/module_args/mojo.gni" ] 60 files_not_to_roll = [
61 "build/config/ui.gni",
62 "build/ls.py",
63 "build/module_args/mojo.gni",
64 ]
61 65
62 dirs = dirs_to_snapshot 66 dirs = dirs_to_snapshot
63 67
64 def chromium_rev_number(src_commit): 68 def chromium_rev_number(src_commit):
65 base_url = "https://cr-rev.appspot.com/_ah/api/crrev/v1/commit/" 69 base_url = "https://cr-rev.appspot.com/_ah/api/crrev/v1/commit/"
66 commit_info = json.load(urllib2.urlopen(base_url + src_commit)) 70 commit_info = json.load(urllib2.urlopen(base_url + src_commit))
67 return commit_info["numberings"][0]["number"] 71 return commit_info["numberings"][0]["number"]
68 72
69 def rev(source_dir): 73 def rev(source_dir):
70 for d in dirs: 74 for d in dirs:
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 112
109 print "Restoring files whose contents don't track Chromium" 113 print "Restoring files whose contents don't track Chromium"
110 for f in files_not_to_roll: 114 for f in files_not_to_roll:
111 system(["git", "checkout", pre_roll_commit, "--", f], cwd=mojo_root_dir) 115 system(["git", "checkout", pre_roll_commit, "--", f], cwd=mojo_root_dir)
112 if files_not_to_roll: 116 if files_not_to_roll:
113 commit("Restored pre-roll versions of files that don't get rolled") 117 commit("Restored pre-roll versions of files that don't get rolled")
114 return 0 118 return 0
115 119
116 if __name__ == "__main__": 120 if __name__ == "__main__":
117 sys.exit(main()) 121 sys.exit(main())
OLDNEW
« no previous file with comments | « mojo/tools/roll/sanitizers_build.patch ('k') | sandbox/linux/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698