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')
-rwxr-xr-x[-rw-r--r--]build_files/scons/tools/Blender.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index e0f18480c74..c3ac92c77b2 100644..100755
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -428,7 +428,8 @@ def buildinfo(lenv, build_type):
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', '@{u}']).strip()
except subprocess.CalledProcessError:
# assume branch has no upstream configured
- build_hash = ''
+ build_hash = btools.get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
+ no_upstream = True
build_branch = btools.get_command_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).strip()
@@ -442,10 +443,7 @@ def buildinfo(lenv, build_type):
if tag_hashes.find(head_hash) != -1:
build_branch = 'master'
- if build_hash == '':
- build_hash = btools.get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
- no_upstream = True
- else:
+ if not no_upstream:
older_commits = btools.get_command_output(['git', 'log', '--oneline', 'HEAD..@{u}']).strip()
if older_commits:
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()