From fcde3ba0a657dd3d5cac15ab8a1b6361e293c2fe Mon Sep 17 00:00:00 2001 From: Erik Chen Date: Fri, 18 Oct 2019 01:12:11 +0000 Subject: [PATCH] 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 Auto-Submit: Erik Chen Reviewed-by: Andrii Shyshkalov --- git_cache.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git_cache.py b/git_cache.py index e41b82752..dba50f5ef 100755 --- a/git_cache.py +++ b/git_cache.py @@ -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)