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

Unified Diff: pylib/gyp/mac_tool.py

Issue 9423022: mac ninja&make: Filter out useless 'This view is clipping its content' message. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/mac_tool.py
===================================================================
--- pylib/gyp/mac_tool.py (revision 1212)
+++ pylib/gyp/mac_tool.py (working copy)
@@ -51,7 +51,7 @@
shutil.rmtree(dest)
shutil.copytree(source, dest)
elif extension == '.xib':
- self._CopyXIBFile(source, dest)
+ return self._CopyXIBFile(source, dest)
elif extension == '.strings':
self._CopyStringsFile(source, dest)
# TODO: Given that files with arbitrary extensions can be copied to the
@@ -70,7 +70,19 @@
args = ['/Developer/usr/bin/ibtool', '--errors', '--warnings',
'--notices', '--output-format', 'human-readable-text', '--compile',
dest, source]
- subprocess.call(args)
+ ibtool_section_re = re.compile(r'/\*.*\*/')
+ ibtool_re = re.compile(r'.*note:.*is clipping its content')
+ ibtoolout = subprocess.Popen(args, stdout=subprocess.PIPE)
+ current_section_header = None
+ for line in ibtoolout.stdout:
+ if ibtool_section_re.match(line):
+ current_section_header = line
+ elif not ibtool_re.match(line):
+ if current_section_header:
+ sys.stdout.write(current_section_header)
+ current_section_header = None
Robert Sesek 2012/02/21 15:53:28 Can there be multiple lines of output under the sa
Nico 2012/02/21 16:23:46 Yes: /* com.apple.ibtool.document.notices */ /b/b
+ sys.stdout.write(line)
+ return ibtoolout.returncode
def _CopyStringsFile(self, source, dest):
"""Copies a .strings file using iconv to reconvert the input into UTF-16."""
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698