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

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

Issue 453873002: Implement rewrite logic for assigning a temporary scoped_refptr to T*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more changes Created 6 years, 4 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 | « tools/clang/rewrite_scoped_refptr/tests/test2-original.cc ('k') | tools/clang/scripts/test_tool.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/scripts/run_tool.py
diff --git a/tools/clang/scripts/run_tool.py b/tools/clang/scripts/run_tool.py
index 3c4f44f83e27c3103ae2d8457a2d29d63c2ce57f..33bb4621878544c06db3a3566c7c856cc343cbba 100755
--- a/tools/clang/scripts/run_tool.py
+++ b/tools/clang/scripts/run_tool.py
@@ -39,6 +39,7 @@ import collections
import functools
import multiprocessing
import os.path
+import pipes
import subprocess
import sys
@@ -215,8 +216,11 @@ def _ApplyEdits(edits, clang_format_diff_path):
f.truncate()
f.write(contents)
if clang_format_diff_path:
+ # TODO(dcheng): python3.3 exposes this publicly as shlex.quote, but Chrome
+ # uses python2.7. Use the deprecated interface until Chrome uses a newer
+ # Python.
if subprocess.call('git diff -U0 %s | python %s -i -p1 -style=file ' % (
- k, clang_format_diff_path), shell=True) != 0:
+ pipes.quote(k), clang_format_diff_path), shell=True) != 0:
print 'clang-format failed for %s' % k
print 'Applied %d edits to %d files' % (edit_count, len(edits))
« no previous file with comments | « tools/clang/rewrite_scoped_refptr/tests/test2-original.cc ('k') | tools/clang/scripts/test_tool.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698