Revert git cache diagnostic tracing.

This reverts commit ebba8d75bf.
This reverts commit fcde3ba0a6.
This reverts commit fd843fa456.

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: Aaron Gable <agable@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
changes/96/1917496/2
John Budorick 6 years ago committed by Commit Bot
parent e6e5db5500
commit 3da78c4bb7

@ -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.

Loading…
Cancel
Save