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:
Diffstat (limited to 'build_files/scons')
-rw-r--r--build_files/scons/tools/Blender.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index 2c2940a51fb..9fa76c0bf1a 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -426,9 +426,18 @@ def buildinfo(lenv, build_type):
build_hash = build_hash.strip()
build_branch = os.popen('git rev-parse --abbrev-ref HEAD').read().strip()
+ if build_branch == 'HEAD':
+ master_check = os.popen('git branch --list master --contains ' + build_hash).read().strip()
+ if master_check == 'master':
+ build_branch = 'master'
+
if build_hash == '':
build_hash = os.popen('git rev-parse --short HEAD').read().strip()
no_upstream = True
+ else:
+ older_commits = os.popen('git log --oneline HEAD..@{u}').read().strip()
+ if older_commits:
+ build_hash = os.popen('git rev-parse --short HEAD').read().strip()
# ## Check for local modifications
has_local_changes = False
@@ -440,7 +449,7 @@ def buildinfo(lenv, build_type):
if changed_files:
has_local_changes = True
elif no_upstream == False:
- unpushed_log = os.popen('git log @{u}..').read().strip()
+ unpushed_log = os.popen('git log --oneline @{u}..').read().strip()
has_local_changes = unpushed_log != ''
if has_local_changes: