Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1084)

Unified Diff: scm.py

Issue 574017: Add automatic retry on HTTP 502 for svn and connection drop for git. (Closed)
Patch Set: Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gclient_scm.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scm.py
diff --git a/scm.py b/scm.py
index df22271a22f995165c2e634af1a2bd551143d7c5..48118d10357ed2f4872271c844aad22cd26ea531 100644
--- a/scm.py
+++ b/scm.py
@@ -380,14 +380,14 @@ class SVN(object):
True,
CaptureMatchingLines)
except gclient_utils.Error:
- # We enforce that some progress has been made.
- if len(failure) and len(file_list) > previous_list_len:
+ # We enforce that some progress has been made or HTTP 502.
+ if ([True for f in failure if '502 Bad Gateway' in f] or
+ (len(failure) and len(file_list) > previous_list_len)):
if args[0] == 'checkout':
- args = args[:]
# An aborted checkout is now an update.
- args[0] = 'update'
+ args = ['update'] + args[1:]
continue
- # No progress was made, bail out.
+ # No progress was made or an unknown error we aren't sure, bail out.
raise
break
« no previous file with comments | « gclient_scm.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698