Commit 48823c28 authored by John Budorick's avatar John Budorick Committed by Commit Bot

Revert "Add more git tracing."

This reverts commit 1e4dbf3f.

Reason for revert: unlikely but possible cause of http://shortn/_sgL4PqICVB

Original change's description:
> Add more git tracing.
> 
> This CL adds more perf tracing to `git fetch` from bot_update.py and
> git_cache.py
> 
> Change-Id: I9b69c60b6c81fc0c5f23f82fcc889b4d45a27556
> Recipe-Nontrivial-Roll: build_limited_scripts_slave
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: infra
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1888433
> Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
> Commit-Queue: Erik Chen <erikchen@chromium.org>
> Auto-Submit: Erik Chen <erikchen@chromium.org>

TBR=danakj@chromium.org,tandrii@google.com,erikchen@chromium.org

Change-Id: I03b33bf1532212f83a6b89b1de32fafb6b8aafc4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1891001Reviewed-by: 's avatarJohn Budorick <jbudorick@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
parent b43d98bf
......@@ -552,6 +552,14 @@ 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]
......@@ -570,6 +578,7 @@ class Mirror(object):
fetch_cmd + [spec],
cwd=rundir,
retry=True,
env=env,
filter_fn=FilterPacket)
except subprocess.CalledProcessError:
if spec == '+refs/heads/*:refs/heads/*':
......
......@@ -666,11 +666,6 @@ def _git_checkout(sln, sln_dir, revisions, refs, git_cache_dir, cleanup_dir):
env = {
'GIT_TRACE': 'true',
'GIT_TRACE_PERFORMANCE': 'true',
'GIT_TRACE_PACKET': '1',
'GIT_TRACE2_EVENT': '1',
'GIT_TRACE_CURL': '1',
'GIT_TRACE_CURL_NO_DATA': '1',
'INFRA_GIT_WRAPPER_TRACE': '1',
}
# Step 1: populate/refresh cache, if necessary.
......@@ -728,11 +723,11 @@ def _git_checkout(sln, sln_dir, revisions, refs, git_cache_dir, cleanup_dir):
else:
_git_disable_gc(sln_dir)
git('remote', 'set-url', 'origin', mirror_dir, cwd=sln_dir)
git('fetch', 'origin', cwd=sln_dir, env=env)
git('fetch', 'origin', cwd=sln_dir)
git('remote', 'set-url', '--push', 'origin', url, cwd=sln_dir)
for ref in refs:
refspec = '%s:%s' % (ref, ref.lstrip('+'))
git('fetch', 'origin', refspec, cwd=sln_dir, env=env)
git('fetch', 'origin', refspec, cwd=sln_dir)
# Windows sometimes has trouble deleting files.
# This can make git commands that rely on locks fail.
......
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