[Bf-blender-cvs] [551f3ee] master: Show hash from latest pushed commit in buildinfo

Sergey Sharybin noreply at git.blender.org
Mon Nov 25 11:27:29 CET 2013


Commit: 551f3eef7403ffcd8838e1034ec1770bf3d37b7d
Author: Sergey Sharybin
Date:   Mon Nov 25 16:25:35 2013 +0600
http://developer.blender.org/rB551f3eef7403ffcd8838e1034ec1770bf3d37b7d

Show hash from latest pushed commit in buildinfo

Before this hash of latest local commit was used,
which is not so much useful since nobody can access
that commit hash.

===================================================================

M	build_files/cmake/buildinfo.cmake
M	build_files/scons/tools/Blender.py

===================================================================

diff --git a/build_files/cmake/buildinfo.cmake b/build_files/cmake/buildinfo.cmake
index 2cc92df..7fc052e 100644
--- a/build_files/cmake/buildinfo.cmake
+++ b/build_files/cmake/buildinfo.cmake
@@ -12,7 +12,7 @@ if(EXISTS ${SOURCE_DIR}/.git/)
 	# The FindSubversion.cmake module is part of the standard distribution
 	include(FindGit)
 	if(GIT_FOUND)
-		execute_process(COMMAND git rev-parse --short HEAD
+		execute_process(COMMAND git rev-parse --short @{u}
 		                WORKING_DIRECTORY ${SOURCE_DIR}
 		                OUTPUT_VARIABLE MY_WC_HASH
 		                OUTPUT_STRIP_TRAILING_WHITESPACE)
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index 894c8db..9d1a639 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -419,7 +419,7 @@ def buildinfo(lenv, build_type):
             build_commit_timestamp = '0'
             build_branch = 'unknown'
         else:
-            build_hash = os.popen('git rev-parse --short HEAD').read().strip()
+            build_hash = os.popen('git rev-parse --short @{u}').read().strip()
             build_branch = os.popen('git rev-parse --abbrev-ref HEAD').read().strip()
 
             # ## Check for local modifications




More information about the Bf-blender-cvs mailing list