mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user