Fix retry mechanism to raise when it fails to checkout.

TBR=jochen
BUG=
TEST=

Review URL: http://codereview.chromium.org/4132002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@63832 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
maruel@chromium.org 15 years ago
parent 7526fe3b28
commit 0350706c3c

@ -351,7 +351,9 @@ class SVN(object):
compiled_pattern = re.compile(pattern) compiled_pattern = re.compile(pattern)
# Place an upper limit. # Place an upper limit.
backoff_time = 5 backoff_time = 5
for _ in range(10): i = 0
while True:
i += 1
previous_list_len = len(file_list) previous_list_len = len(file_list)
failure = [] failure = []
@ -404,6 +406,8 @@ class SVN(object):
if len(file_list) == previous_list_len and not IsKnownFailure(): if len(file_list) == previous_list_len and not IsKnownFailure():
# No known svn error was found and no progress, bail out. # No known svn error was found and no progress, bail out.
raise raise
if i == 10:
raise
print "Sleeping %.1f seconds and retrying...." % backoff_time print "Sleeping %.1f seconds and retrying...." % backoff_time
time.sleep(backoff_time) time.sleep(backoff_time)
backoff_time *= 1.3 backoff_time *= 1.3

Loading…
Cancel
Save