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

Side by Side Diff: tools/sort-headers.py

Issue 6873034: Add a tool that estimates the size of a file after all #includes have been resolved. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 9 years, 8 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
« tools/include_tracer.py ('K') | « tools/include_tracer.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
Evan Martin 2011/04/18 21:46:47 Probably didn't mean to include this (?)
Nico 2011/04/18 21:54:28 I opened this file to copy the license header, and
2 5
3 """Given a filename as an argument, sort the #include/#imports in that file. 6 """Given a filename as an argument, sort the #include/#imports in that file.
4 7
5 Shows a diff and prompts for confirmation before doing the deed. 8 Shows a diff and prompts for confirmation before doing the deed.
6 """ 9 """
7 10
8 import optparse 11 import optparse
9 import os 12 import os
10 import sys 13 import sys
11 import termios 14 import termios
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 finally: 88 finally:
86 try: 89 try:
87 os.remove(fixfilename) 90 os.remove(fixfilename)
88 except OSError: 91 except OSError:
89 # If the file isn't there, we don't care. 92 # If the file isn't there, we don't care.
90 pass 93 pass
91 94
92 95
93 if __name__ == '__main__': 96 if __name__ == '__main__':
94 main() 97 main()
OLDNEW
« tools/include_tracer.py ('K') | « tools/include_tracer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698