Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2021-09-20 13:40:51 +0300
committerBastien Montagne <bastien@blender.org>2021-09-20 13:44:01 +0300
commit11e11c41f2695f6f412079d438b675516aa8151a (patch)
treef4c1afee93f7b86ec9bcc079f2a800732de29ced /build_files
parent7da9da2b27ddddedb93f9390fd1b857fe736b00c (diff)
make_update: Fix case where a sub-module would not have required branch.
Issue revealed by rB546314fc9669 change, also error itself exited before that commit. Now we do accept git command to fail when trying to checkout the specified branch from sub-modules, and only actually error in case the fall-back branch (aka master) cannot be properly checked out. Thanks fot Ray molenkamp (@LazyDodo) for report and initial patch (D12560).
Diffstat (limited to 'build_files')
-rwxr-xr-xbuild_files/utils/make_update.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/build_files/utils/make_update.py b/build_files/utils/make_update.py
index a6399790bc9..f653639ec6d 100755
--- a/build_files/utils/make_update.py
+++ b/build_files/utils/make_update.py
@@ -200,13 +200,14 @@ def submodules_update(args, release_version, branch):
if msg:
skip_msg += submodule_path + " skipped: " + msg + "\n"
else:
+ # We are using `exit_on_error=False` here because sub-modules are allowed to not have requested branch,
+ # in which case falling back to default back-up branch is fine.
if make_utils.git_branch(args.git_command) != submodule_branch:
call([args.git_command, "fetch", "origin"])
- call([args.git_command, "checkout", submodule_branch])
- call([args.git_command, "pull", "--rebase", "origin", submodule_branch])
+ call([args.git_command, "checkout", submodule_branch], exit_on_error=False)
+ call([args.git_command, "pull", "--rebase", "origin", submodule_branch], exit_on_error=False)
# If we cannot find the specified branch for this submodule, fallback to default one (aka master).
if make_utils.git_branch(args.git_command) != submodule_branch:
- call([args.git_command, "fetch", "origin"])
call([args.git_command, "checkout", submodule_branch_fallback])
call([args.git_command, "pull", "--rebase", "origin", submodule_branch_fallback])
finally: