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

Unified Diff: dart/tools/build.py

Issue 13724018: Shorten "progress" information, and make sure it never extend 80 columns. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged Created 7 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 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: dart/tools/build.py
diff --git a/dart/tools/build.py b/dart/tools/build.py
index 3b8c12e839af5afe2056ac7e192ac64ee3a8a866..c6887f4d6c1bc3e3afe37e994f2963e9598f4756 100755
--- a/dart/tools/build.py
+++ b/dart/tools/build.py
@@ -7,6 +7,7 @@
import optparse
import os
+import re
import shutil
import subprocess
import sys
@@ -273,6 +274,8 @@ PhaseScriptExecution "Action \"upload_sdk_py\"" xcodebuild/dart.build/...
is_fancy_tty = True
except subprocess.CalledProcessError:
is_fancy_tty = False
+ pattern = re.compile(r'=== BUILD .* TARGET (.*) OF PROJECT (.*) WITH ' +
+ r'CONFIGURATION (.*) ===')
has_interesting_info = False
for line in unbuffered(process.stdout.readline):
line = line.rstrip()
@@ -280,6 +283,12 @@ PhaseScriptExecution "Action \"upload_sdk_py\"" xcodebuild/dart.build/...
has_interesting_info = False
section = line
if is_fancy_tty:
+ match = re.match(pattern, section)
+ if match:
+ section = '%s/%s/%s' % (
+ match.group(3), match.group(2), match.group(1))
+ # Truncate to avoid extending beyond 80 columns.
+ section = section[:80]
# If stdout is a terminal, emit "progress" information. The
# progress information is the first line of the current chunk.
# After printing the line, move the cursor back to the
« 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