[Bf-blender-cvs] [4587d27] soc-2013-paint: Fix compilation error with scons when building from detached head
Sergey Sharybin
noreply at git.blender.org
Sat Jul 12 12:44:45 CEST 2014
Commit: 4587d27108ff806a6a97a65a4f81aab35fe5812a
Author: Sergey Sharybin
Date: Thu Jul 10 16:23:48 2014 +0600
https://developer.blender.org/rB4587d27108ff806a6a97a65a4f81aab35fe5812a
Fix compilation error with scons when building from detached head
===================================================================
M build_files/scons/tools/Blender.py
===================================================================
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
old mode 100644
new mode 100755
index e0f1848..c3ac92c
--- 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()
More information about the Bf-blender-cvs
mailing list