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-28 23:44:55 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-28 23:44:55 +0000
commit758fed1b99052dd570ebf9cc340a2b13e326554f (patch)
tree1cd2b17f07a98d8907f4ad2b42d94fc106f7a27f /tools/sync-webkit-git.py
parent8654ddd0cbb84fc6ac2b40f8ba4aec0e6566248a (diff)
downloadchromium_src-758fed1b99052dd570ebf9cc340a2b13e326554f.zip
chromium_src-758fed1b99052dd570ebf9cc340a2b13e326554f.tar.gz
chromium_src-758fed1b99052dd570ebf9cc340a2b13e326554f.tar.bz2
sync-webkit-git: more windows fixes
We must pass shell=True on Windows for all subprocess module functions to get PATH expansion for finding git. This is commented in the first call to a subprocess function, so don't duplicate that comment elsewhere. Review URL: http://codereview.chromium.org/3067015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54072 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/sync-webkit-git.py')
-rwxr-xr-xtools/sync-webkit-git.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/sync-webkit-git.py b/tools/sync-webkit-git.py
index 1af8836f..a54dfeb 100755
--- a/tools/sync-webkit-git.py
+++ b/tools/sync-webkit-git.py
@@ -51,10 +51,9 @@ 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'], shell=shell,
+ '--pretty=medium', 'origin'],
+ shell=(os.name == 'nt'),
stdout=subprocess.PIPE)
# Track whether we saw a revision *later* than the one we're seeking.
saw_later = False
@@ -88,7 +87,7 @@ def UpdateGClientBranch(webkit_rev):
target = FindSVNRev(webkit_rev)
if not target:
print "r%s not available; fetching." % webkit_rev
- subprocess.check_call(['git', 'fetch'])
+ subprocess.check_call(['git', 'fetch'], shell=(os.name == 'nt'))
target = FindSVNRev(webkit_rev)
if not target:
print "ERROR: Couldn't map r%s to a git revision." % webkit_rev
@@ -99,7 +98,8 @@ def UpdateGClientBranch(webkit_rev):
return False # No change necessary.
subprocess.check_call(['git', 'update-ref', '-m', 'gclient sync',
- MAGIC_GCLIENT_BRANCH, target])
+ MAGIC_GCLIENT_BRANCH, target],
+ shell=(os.name == 'nt'))
return True
def UpdateCurrentCheckoutIfAppropriate():
@@ -113,9 +113,9 @@ def UpdateCurrentCheckoutIfAppropriate():
return 1
if subprocess.call(['git', 'diff-index', '--exit-code', '--shortstat',
- 'HEAD']):
+ 'HEAD'], shell=(os.name == 'nt')):
print "Resetting tree state to new revision."
- subprocess.check_call(['git', 'reset', '--hard'])
+ subprocess.check_call(['git', 'reset', '--hard'], shell=(os.name == 'nt'))
def main():
if not os.path.exists('third_party/WebKit/.git'):