mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Add debug logs during Clone process.
The try/except was added for one specific situation but the 'except' portion accepts a wide range of errors. This results in confusing logs and nothing clearly states what actually caused the error. Bug: 1349905, 1350210 Change-Id: Ia86c71b0b77658992fca5d3de215e659ccd90d96 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3810798 Commit-Queue: Joanna Wang <jojwang@chromium.org> Reviewed-by: Gavin Mak <gavinmak@google.com>
This commit is contained in:
@@ -644,7 +644,8 @@ class GitWrapper(SCMWrapper):
|
||||
self._UpdateMirrorIfNotContains(mirror, options, rev_type, revision)
|
||||
try:
|
||||
self._Clone(revision, url, options)
|
||||
except subprocess2.CalledProcessError:
|
||||
except subprocess2.CalledProcessError as e:
|
||||
logging.warning('Clone failed due to: %s', e)
|
||||
self._DeleteOrMove(options.force)
|
||||
self._Clone(revision, url, options)
|
||||
if file_list is not None:
|
||||
@@ -1173,6 +1174,7 @@ class GitWrapper(SCMWrapper):
|
||||
retry=True,
|
||||
print_stdout=print_stdout,
|
||||
filter_fn=filter_fn)
|
||||
logging.debug('Cloned into temporary dir, moving to checkout_path')
|
||||
gclient_utils.safe_makedirs(self.checkout_path)
|
||||
gclient_utils.safe_rename(os.path.join(tmp_dir, '.git'),
|
||||
os.path.join(self.checkout_path, '.git'))
|
||||
|
||||
Reference in New Issue
Block a user