Commit e939bb5d authored by nsylvain@google.com's avatar nsylvain@google.com

Remove empty lines from the output while using --jobs.

While using --jobs, empty lines are adding a lot of noise.

An example output would look like:

>gclient sync --jobs=10
1>
3>
4>
6>
5>
7>
5>
5>________ running 'git clone ...'
Review URL: http://codereview.chromium.org/7101012

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@87542 0039d316-1c4b-4281-b951-d872f2087c98
parent 328c3c73
......@@ -362,7 +362,8 @@ def MakeFileAnnotated(fileobj):
obj[0] += out
while '\n' in obj[0]:
line, remaining = obj[0].split('\n', 1)
new_fileobj.old_annotated_write('%d>%s\n' % (index, line))
if line:
new_fileobj.old_annotated_write('%d>%s\n' % (index, line))
obj[0] = remaining
def full_flush():
......@@ -383,7 +384,8 @@ def MakeFileAnnotated(fileobj):
# Don't keep the lock while writting. Will append \n when it shouldn't.
for orphan in orphans:
new_fileobj.old_annotated_write('%d>%s\n' % (orphan[0], orphan[1]))
if orphan[1]:
new_fileobj.old_annotated_write('%d>%s\n' % (orphan[0], orphan[1]))
new_fileobj.write = annotated_write
new_fileobj.full_flush = full_flush
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment