Revert git cache diagnostic tracing.
This reverts commit ebba8d75bf65250198a1f5c84295e119129915bd.
This reverts commit fcde3ba0a657dd3d5cac15ab8a1b6361e293c2fe.
This reverts commit fd843fa45664e693f091e73a8ba49a00a32a3b80.
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>
diff --git a/git_cache.py b/git_cache.py
index 4a1ec03..bad09e9 100755
--- a/git_cache.py
+++ b/git_cache.py
@@ -355,14 +355,6 @@
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 @@
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.