Commit 3da78c4b authored by John Budorick's avatar John Budorick Committed by Commit Bot

Revert git cache diagnostic tracing.

This reverts commit ebba8d75.
This reverts commit fcde3ba0.
This reverts commit fd843fa4.

Bug: 1019824
Change-Id: I14ad2d4f620ac316421f1c3d168b66176af2d26e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1917496
Auto-Submit: John Budorick <jbudorick@chromium.org>
Reviewed-by: 's avatarAaron Gable <agable@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
parent e6e5db55
......@@ -355,14 +355,6 @@ class Mirror(object):
if cwd is None:
cwd = self.mirror_path
# Print diagnostics and ignore errors.
try:
self.print('git exe: %s' % (self.git_exe,))
self.RunGit(['version'], cwd=cwd)
self.RunGit(['config', 'protocol.version'], cwd=cwd)
except subprocess.CalledProcessError as e:
pass
if reset_fetch_config:
try:
self.RunGit(['config', '--unset-all', 'remote.origin.fetch'], cwd=cwd)
......@@ -555,34 +547,8 @@ class Mirror(object):
spec = spec.decode()
try:
self.print('Fetching %s' % spec)
env = os.environ.copy()
env.update({
'GIT_TRACE_PACKET': '1',
'GIT_TR2_EVENT': '1',
'GIT_TRACE2_EVENT': '1',
'GIT_TRACE_CURL': '1',
'GIT_TRACE_CURL_NO_DATA': '1'
})
# 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] == 30000:
self.print('Truncating remaining packets')
if packet_count[0] >= 30000:
return
self.print(log_line)
with self.print_duration_of('fetch %s' % spec):
self.RunGit(
fetch_cmd + [spec],
cwd=rundir,
retry=True,
env=env,
filter_fn=FilterPacket)
self.RunGit(fetch_cmd + [spec], cwd=rundir, retry=True)
except subprocess.CalledProcessError:
if spec == '+refs/heads/*:refs/heads/*':
raise ClobberNeeded() # Corrupted cache.
......
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