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

Side by Side Diff: git_common.py

Issue 701843004: Added transient 502 errors to 'git_retry' list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 # crbug.com/202807 75 # crbug.com/202807
76 r'The remote end hung up unexpectedly', 76 r'The remote end hung up unexpectedly',
77 77
78 # crbug.com/298189 78 # crbug.com/298189
79 r'TLS packet with unexpected length was received', 79 r'TLS packet with unexpected length was received',
80 80
81 # crbug.com/187444 81 # crbug.com/187444
82 r'RPC failed; result=\d+, HTTP code = \d+', 82 r'RPC failed; result=\d+, HTTP code = \d+',
83 83
84 # crbug.com/315421
85 r'The requested URL returned error: 500 while accessing',
86
87 # crbug.com/388876 84 # crbug.com/388876
88 r'Connection timed out', 85 r'Connection timed out',
86
87 # crbug.com/430343
88 # TODO(dnj): Resync with Chromite.
89 r'The requested URL returned error: 5\d+',
89 ) 90 )
90 91
91 GIT_TRANSIENT_ERRORS_RE = re.compile('|'.join(GIT_TRANSIENT_ERRORS), 92 GIT_TRANSIENT_ERRORS_RE = re.compile('|'.join(GIT_TRANSIENT_ERRORS),
92 re.IGNORECASE) 93 re.IGNORECASE)
93 94
94 # First version where the for-each-ref command's format string supported the 95 # First version where the for-each-ref command's format string supported the
95 # upstream:track token. 96 # upstream:track token.
96 MIN_UPSTREAM_TRACK_GIT_VERSION = (1, 9) 97 MIN_UPSTREAM_TRACK_GIT_VERSION = (1, 9)
97 98
98 class BadCommitRefException(Exception): 99 class BadCommitRefException(Exception):
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 hash=branch_hash, upstream=upstream_branch, ahead=ahead, behind=behind) 762 hash=branch_hash, upstream=upstream_branch, ahead=ahead, behind=behind)
762 763
763 # Set None for upstreams which are not branches (e.g empty upstream, remotes 764 # Set None for upstreams which are not branches (e.g empty upstream, remotes
764 # and deleted upstream branches). 765 # and deleted upstream branches).
765 missing_upstreams = {} 766 missing_upstreams = {}
766 for info in info_map.values(): 767 for info in info_map.values():
767 if info.upstream not in info_map and info.upstream not in missing_upstreams: 768 if info.upstream not in info_map and info.upstream not in missing_upstreams:
768 missing_upstreams[info.upstream] = None 769 missing_upstreams[info.upstream] = None
769 770
770 return dict(info_map.items() + missing_upstreams.items()) 771 return dict(info_map.items() + missing_upstreams.items())
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