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

Side by Side Diff: git_common.py

Issue 2165643002: Add more error regexps for git retry (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Add more error regexps for git retry Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # Monkeypatch IMapIterator so that Ctrl-C can kill everything properly. 5 # Monkeypatch IMapIterator so that Ctrl-C can kill everything properly.
6 # Derived from https://gist.github.com/aljungberg/626518 6 # Derived from https://gist.github.com/aljungberg/626518
7 import multiprocessing.pool 7 import multiprocessing.pool
8 from multiprocessing.pool import IMapIterator 8 from multiprocessing.pool import IMapIterator
9 def wrapper(func): 9 def wrapper(func):
10 def wrap(self, timeout=None): 10 def wrap(self, timeout=None):
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 # crbug.com/187444 86 # crbug.com/187444
87 r'RPC failed; result=\d+, HTTP code = \d+', 87 r'RPC failed; result=\d+, HTTP code = \d+',
88 88
89 # crbug.com/388876 89 # crbug.com/388876
90 r'Connection timed out', 90 r'Connection timed out',
91 91
92 # crbug.com/430343 92 # crbug.com/430343
93 # TODO(dnj): Resync with Chromite. 93 # TODO(dnj): Resync with Chromite.
94 r'The requested URL returned error: 5\d+', 94 r'The requested URL returned error: 5\d+',
95
96 r'Connection reset by peer',
97
98 r'Unable to look up',
99
100 r'Couldn\'t resolve host',
95 ) 101 )
96 102
97 GIT_TRANSIENT_ERRORS_RE = re.compile('|'.join(GIT_TRANSIENT_ERRORS), 103 GIT_TRANSIENT_ERRORS_RE = re.compile('|'.join(GIT_TRANSIENT_ERRORS),
98 re.IGNORECASE) 104 re.IGNORECASE)
99 105
100 # git's for-each-ref command first supported the upstream:track token in its 106 # git's for-each-ref command first supported the upstream:track token in its
101 # format string in version 1.9.0, but some usages were broken until 2.3.0. 107 # format string in version 1.9.0, but some usages were broken until 2.3.0.
102 # See git commit b6160d95 for more information. 108 # See git commit b6160d95 for more information.
103 MIN_UPSTREAM_TRACK_GIT_VERSION = (2, 3) 109 MIN_UPSTREAM_TRACK_GIT_VERSION = (2, 3)
104 110
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 ['HEAD']) 1008 ['HEAD'])
1003 1009
1004 1010
1005 def clone_file(repository, new_workdir, link, operation): 1011 def clone_file(repository, new_workdir, link, operation):
1006 if not os.path.exists(os.path.join(repository, link)): 1012 if not os.path.exists(os.path.join(repository, link)):
1007 return 1013 return
1008 link_dir = os.path.dirname(os.path.join(new_workdir, link)) 1014 link_dir = os.path.dirname(os.path.join(new_workdir, link))
1009 if not os.path.exists(link_dir): 1015 if not os.path.exists(link_dir):
1010 os.makedirs(link_dir) 1016 os.makedirs(link_dir)
1011 operation(os.path.join(repository, link), os.path.join(new_workdir, link)) 1017 operation(os.path.join(repository, link), os.path.join(new_workdir, link))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698