OLD | NEW |
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 Loading... |
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 Loading... |
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)) |
OLD | NEW |