From 352380f6598b0472e852d2f50669aa13874d2ac9 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Mon, 4 Oct 2021 21:21:20 -0400 Subject: [PATCH] Revert "msubprojects: if fetching the remote fails, gracefully fallback to local copy" This reverts commit 4568482316f63c48559b97c9a4771740ed61eca6. 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. --- mesonbuild/msubprojects.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/mesonbuild/msubprojects.py b/mesonbuild/msubprojects.py index dfcff0129..293d43d8f 100755 --- a/mesonbuild/msubprojects.py +++ b/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