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:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-07-10 14:23:48 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-07-10 14:23:48 +0400
commit42615d88b6ebf263ecce7535591fa9f000b1f597 (patch)
treeb6207300494af514485eac29cae9e2e79ec39149 /build_files
parenta1aa96940c74f51a8661a497286c8e9b7ecc460f (diff)
Fix compilation error with scons when building from detached head
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()