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

Side by Side Diff: trunk/src/third_party/clang_format/scripts/clang-format-diff.py

Issue 135793002: Revert 244398 "Revert of https://codereview.chromium.org/111953007/" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # 2 #
3 #===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===# 3 #===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===#
4 # 4 #
5 # The LLVM Compiler Infrastructure 5 # The LLVM Compiler Infrastructure
6 # 6 #
7 # This file is distributed under the University of Illinois Open Source 7 # This file is distributed under the University of Illinois Open Source
8 # License. See LICENSE.TXT for details. 8 # License. See LICENSE.TXT for details.
9 # 9 #
10 #===------------------------------------------------------------------------===# 10 #===------------------------------------------------------------------------===#
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 formatted_code = StringIO.StringIO(stdout).readlines() 105 formatted_code = StringIO.StringIO(stdout).readlines()
106 diff = difflib.unified_diff(code, formatted_code, 106 diff = difflib.unified_diff(code, formatted_code,
107 filename, filename, 107 filename, filename,
108 '(before formatting)', '(after formatting)') 108 '(before formatting)', '(after formatting)')
109 diff_string = string.join(diff, '') 109 diff_string = string.join(diff, '')
110 if len(diff_string) > 0: 110 if len(diff_string) > 0:
111 sys.stdout.write(diff_string) 111 sys.stdout.write(diff_string)
112 112
113 if __name__ == '__main__': 113 if __name__ == '__main__':
114 main() 114 main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698