summaryrefslogtreecommitdiffstats
path: root/tools/sync-webkit-git.py
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-20 23:05:37 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-20 23:05:37 +0000
commit8f8fb009a751210801955a262947ef90817a2f61 (patch)
tree383a94aa41291f35b0be4bed14bba844a8cda176 /tools/sync-webkit-git.py
parent6190743ab698c93cff865a5e7faf04cca31bd995 (diff)
downloadchromium_src-8f8fb009a751210801955a262947ef90817a2f61.zip
chromium_src-8f8fb009a751210801955a262947ef90817a2f61.tar.gz
chromium_src-8f8fb009a751210801955a262947ef90817a2f61.tar.bz2
sync-webkit-git: fixes to work on Windows
You need shell=True on Windows for it to understand PATH. (Python's subprocess module is confusing: the Windows semantics are significantly different than the Unix ones. Either way on Windows, the command array is flattened and shell-escaped.) Review URL: http://codereview.chromium.org/3032009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53119 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/sync-webkit-git.py')
-rwxr-xr-xtools/sync-webkit-git.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/sync-webkit-git.py b/tools/sync-webkit-git.py
index 239e6ad..1af8836f 100755
--- a/tools/sync-webkit-git.py
+++ b/tools/sync-webkit-git.py
@@ -23,7 +23,10 @@ MAGIC_GCLIENT_BRANCH = 'refs/heads/gclient'
def RunGit(command):
"""Run a git subcommand, returning its output."""
- proc = subprocess.Popen(['git'] + command, stdout=subprocess.PIPE)
+ # On Windows, use shell=True to get PATH interpretation.
+ shell = (os.name == 'nt')
+ proc = subprocess.Popen(['git'] + command, shell=shell,
+ stdout=subprocess.PIPE)
return proc.communicate()[0].strip()
def GetWebKitRev():
@@ -48,8 +51,10 @@ def FindSVNRev(target_rev):
# regexp matching the git-svn line from the log.
git_svn_re = re.compile(r'^\s+git-svn-id: [^@]+@(\d+) ')
+ # On Windows, use shell=True to get PATH interpretation.
+ shell = (os.name == 'nt')
log = subprocess.Popen(['git', 'log', '--no-color', '--first-parent',
- '--pretty=medium', 'origin'],
+ '--pretty=medium', 'origin'], shell=shell,
stdout=subprocess.PIPE)
# Track whether we saw a revision *later* than the one we're seeking.
saw_later = False