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

Unified Diff: tools/clang/scripts/upload_revision.py

Issue 2324553003: Try to get clang upload script working on Windows. (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/scripts/upload_revision.py
diff --git a/tools/clang/scripts/upload_revision.py b/tools/clang/scripts/upload_revision.py
index b6331df6cdb55a00a4b027da7179de3ba59498fb..8481616c08dc4333f46ebe761348e75f131759fb 100755
--- a/tools/clang/scripts/upload_revision.py
+++ b/tools/clang/scripts/upload_revision.py
@@ -39,7 +39,9 @@ def PatchRevision(clang_revision, clang_sub_revision):
def Git(args):
- subprocess.check_call(["git"] + args)
+ is_win = sys.platform.startswith('win32')
scottmg 2016/09/07 22:00:45 Maybe make is_win (or IS_WIN) a global.
Nico 2016/09/07 22:01:53 Done.
+ # Needs shell=True on Windows due to gn.bat in depot_tools.
scottmg 2016/09/07 22:00:45 ...due to git.bat...
Nico 2016/09/07 22:01:53 Done.
+ subprocess.check_call(["git"] + args, shell=is_win)
def main():
parser = argparse.ArgumentParser(description='upload new clang revision')
@@ -54,8 +56,10 @@ def main():
clang_revision = args.clang_revision[0]
clang_sub_revision = args.clang_sub_revision
+ is_win = sys.platform.startswith('win32')
+ # Needs shell=True on Windows due to gn.bat in depot_tools.
git_revision = subprocess.check_output(
- ["git", "rev-parse", "origin/master"]).strip()
+ ["git", "rev-parse", "origin/master"], shell=is_win).strip()
print "Making a patch for Clang revision r{}-{}".format(
clang_revision, clang_sub_revision)
print "Chrome revision: {}".format(git_revision)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698