Commit 91514ab2 authored by bauerb@chromium.org's avatar bauerb@chromium.org

Revert 143898 - Skip updating remotes if we already have the upstream revision.

TBR=maruel@chromium.org

BUG=none
TEST=none


Review URL: https://chromiumcodereview.appspot.com/10663019

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@143911 0039d316-1c4b-4281-b951-d872f2087c98
parent f407f09f
......@@ -353,28 +353,27 @@ class GitWrapper(SCMWrapper):
else:
raise gclient_utils.Error('Invalid Upstream: %s' % upstream_branch)
if not scm.GIT.IsValidRevision(cwd=self.checkout_path, rev=revision):
# Update the remotes first so we have all the refs.
backoff_time = 5
for _ in range(10):
try:
remote_output = scm.GIT.Capture(
['remote'] + verbose + ['update'],
cwd=self.checkout_path)
break
except subprocess2.CalledProcessError, e:
# Hackish but at that point, git is known to work so just checking for
# 502 in stderr should be fine.
if '502' in e.stderr:
print(str(e))
print('Sleeping %.1f seconds and retrying...' % backoff_time)
time.sleep(backoff_time)
backoff_time *= 1.3
continue
raise
# Update the remotes first so we have all the refs.
backoff_time = 5
for _ in range(10):
try:
remote_output = scm.GIT.Capture(
['remote'] + verbose + ['update'],
cwd=self.checkout_path)
break
except subprocess2.CalledProcessError, e:
# Hackish but at that point, git is known to work so just checking for
# 502 in stderr should be fine.
if '502' in e.stderr:
print(str(e))
print('Sleeping %.1f seconds and retrying...' % backoff_time)
time.sleep(backoff_time)
backoff_time *= 1.3
continue
raise
if verbose:
print(remote_output.strip())
if verbose:
print(remote_output.strip())
# This is a big hammer, debatable if it should even be here...
if options.force or options.reset:
......
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