Revert "msubprojects: if fetching the remote fails, gracefully fallback to local copy"

This reverts commit 4568482316.

As it turns out, the rationale for this was completely bogus. This
command doesn't re-apply the patch_directory etc. and in fact there is
no command whatsoever that does this. So, this command does not have two
purposes, and we are not making one of them more robust -- instead it
has one purpose, and we are making it lie about whether it failed.

Instead of trying to freeload off of this command, we will just add
another command to properly apply patch overlays.
pull/9306/head
Eli Schwartz 3 years ago committed by Xavier Claessens
parent 95d8b8787a
commit 352380f659
  1. 11
      mesonbuild/msubprojects.py

@ -267,14 +267,9 @@ class Runner:
self.git_output(['fetch', '--refmap', heads_refmap, '--refmap', tags_refmap, 'origin', revision])
except GitException as e:
self.log(' -> Could not fetch revision', mlog.bold(revision), 'in', mlog.bold(self.repo_dir))
if quiet_git(['rev-parse', revision + '^{commit}'], self.repo_dir)[0]:
self.log(mlog.yellow('WARNING:'), 'Proceeding with locally available copy')
# Trick git into setting FETCH_HEAD from the local revision.
quiet_git(['fetch', '.', revision], self.repo_dir)
else:
self.log(mlog.red(e.output))
self.log(mlog.red(str(e)))
return False
self.log(mlog.red(e.output))
self.log(mlog.red(str(e)))
return False
if branch == '':
# We are currently in detached mode

Loading…
Cancel
Save