summaryrefslogtreecommitdiffstats
path: root/mojo/tools/rev_sdk.py
diff options
context:
space:
mode:
authorrockot <rockot@chromium.org>2015-05-21 18:42:12 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-22 01:42:32 +0000
commit8ddc364fd10bcfe1a4332f0f66be4e5db84e39b6 (patch)
tree93859c86bf9a8523a919d9d5f87a7be41a1899d9 /mojo/tools/rev_sdk.py
parenta83337c02e2a14e7e0e043f244cdea62c814d67a (diff)
downloadchromium_src-8ddc364fd10bcfe1a4332f0f66be4e5db84e39b6.zip
chromium_src-8ddc364fd10bcfe1a4332f0f66be4e5db84e39b6.tar.gz
chromium_src-8ddc364fd10bcfe1a4332f0f66be4e5db84e39b6.tar.bz2
Update mojo sdk to rev 1dc8a9a5db73d3718d99917fadf31f5fb2ebad4f
BUG=None R=jam@chromium.org Review URL: https://codereview.chromium.org/1142043005 Cr-Commit-Position: refs/heads/master@{#331044}
Diffstat (limited to 'mojo/tools/rev_sdk.py')
-rwxr-xr-xmojo/tools/rev_sdk.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/mojo/tools/rev_sdk.py b/mojo/tools/rev_sdk.py
index 15812c5..06241ee 100755
--- a/mojo/tools/rev_sdk.py
+++ b/mojo/tools/rev_sdk.py
@@ -23,7 +23,7 @@ sdk_dirs_to_clone = [
sdk_dirs_to_not_clone = [
"mojo/public/cpp/application",
"mojo/public/interfaces/application",
- "third_party/mojo/src/mojo/public/java/application",
+ "mojo/public/java/application",
]
# Individual files to preserve within the target repository during roll. These
@@ -43,8 +43,9 @@ for sdk_dir in sdk_dirs_to_clone:
sdk_dir_in_chromium = os.path.join(sdk_prefix_in_chromium, sdk_dir)
dirs_to_clone[sdk_dir] = sdk_dir_in_chromium
-def rev(source_dir, chromium_dir):
- src_commit = system(["git", "show-ref", "HEAD", "-s"], cwd=source_dir).strip()
+def rev(source_dir, chromium_dir, mojo_revision):
+ src_commit = system(["git", "rev-parse", mojo_revision],
+ cwd=source_dir).strip()
for input_dir, dest_dir in dirs_to_clone.iteritems():
if os.path.exists(os.path.join(chromium_dir, dest_dir)):
@@ -89,8 +90,15 @@ def rev(source_dir, chromium_dir):
commit("Update mojo sdk to rev " + src_commit, cwd=chromium_dir)
-if len(sys.argv) != 2:
- print "usage: rev_sdk.py <mojo source dir>"
+if len(sys.argv) < 2:
+ print "usage: rev_sdk.py <mojo source dir> [<mojo revision>]"
sys.exit(1)
-rev(sys.argv[1], chromium_root_dir)
+# Allow override of the roll revision.
+if len(sys.argv) == 3:
+ mojo_revision = sys.argv[2]
+else:
+ mojo_revision = 'origin/HEAD'
+
+rev(sys.argv[1], chromium_root_dir, mojo_revision)
+