summaryrefslogtreecommitdiff
path: root/mesonbuild/msubprojects.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2023-10-07 03:09:44 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2023-10-11 23:48:13 +0530
commitb78aa8f9e98c01d7be87fcb1cbcbea2ba33fb84a (patch)
tree6851b9de469792e65efe31eea24550ddf492b33b /mesonbuild/msubprojects.py
parent3af0632c3d02c552982737580cfac56adb72c8ad (diff)
downloadmeson-b78aa8f9e98c01d7be87fcb1cbcbea2ba33fb84a.tar.gz
msubprojects: Abort the rebase if there's conflicts
Don't leave the subproject tree in a broken / conflicting state. The user is most likely not a git expert who will know what magic command to run to fix their source tree.
Diffstat (limited to 'mesonbuild/msubprojects.py')
-rwxr-xr-xmesonbuild/msubprojects.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/msubprojects.py b/mesonbuild/msubprojects.py
index 45b711d13..87905deb4 100755
--- a/mesonbuild/msubprojects.py
+++ b/mesonbuild/msubprojects.py
@@ -231,7 +231,9 @@ class Runner:
try:
self.git_output(['-c', 'rebase.autoStash=true', 'rebase', 'FETCH_HEAD'])
except GitException as e:
- self.log(' -> Could not rebase', mlog.bold(self.repo_dir), 'onto', mlog.bold(revision))
+ self.git_output(['-c', 'rebase.autoStash=true', 'rebase', '--abort'])
+ self.log(' -> Could not rebase', mlog.bold(self.repo_dir), 'onto', mlog.bold(revision),
+ '-- aborted')
self.log(mlog.red(e.output))
self.log(mlog.red(str(e)))
return False