Commit fcde3ba0 authored by Erik Chen's avatar Erik Chen Committed by Commit Bot

Store up to 30000 packet log lines for git fetch.

We currently fetch tags, which consumes ~17k lines. This limit ensures that we
won't blow up the log files in exceptional circumstances [currently setting
around ~2MB], but still allows us to get all the logs.

Change-Id: Ib690aaa07e2bde8549d221b90511b6c4863c3358
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: skia
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1867971
Commit-Queue: Erik Chen <erikchen@chromium.org>
Auto-Submit: Erik Chen <erikchen@chromium.org>
Reviewed-by: 's avatarAndrii Shyshkalov <tandrii@google.com>
parent 16af3560
......@@ -558,16 +558,16 @@ class Mirror(object):
'GIT_TRACE_PERFORMANCE': '1',
'GIT_TRACE_SETUP': '1'
})
# Only print first 30 packets. We can use nonlocal keyword once we
# Only print first 30000 packets. We can use nonlocal keyword once we
# switch to python 3.
packet_count = [0]
def FilterPacket(log_line):
if 'packet:' in log_line:
packet_count[0] += 1
if packet_count[0] == 30:
if packet_count[0] == 30000:
self.print('Truncating remaining packets')
if packet_count[0] >= 30:
if packet_count[0] >= 30000:
return
self.print(log_line)
......
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