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>2013-11-04 17:21:39 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-11-04 17:21:39 +0400
commit2010c6ad6cae41b5f13b36339404ff60c98ae915 (patch)
tree543e34b74bf56ce9338f3ae0e029852cdd78905a /source/blender/collada
parentd07f3f793b8c7596e36249d589aafcf63611cc1d (diff)
Made buildinfo aware of builds from GIT
- Use commit number since last annotated tag as a revision number replacement. It'll eb followed by 'M' symbol if there're local modification in the source tree. - Commit short SHA1 is included. Helps getting information about commit used to build blender with much faster. - If build is not done from master branch, this also will be noticed in the splash screen. This commit also replaces revision stored in the files with git-specific fields (change and hash). This is kind of breaks compatibility, meaning files which were saved before this change wouldn't display any information about which revision they were saved with. When we'll finally switch to git, we'll see proper hash and change number since previous release in the files, for until then svn version will be used as a change number and hash will be empty. Not a huge deal, since this field was only used by developers to help torubleshooting things and isn't needed for blender itself. Some additional tweaks are probably needed :)
Diffstat (limited to 'source/blender/collada')
-rw-r--r--source/blender/collada/AnimationExporter.h4
-rw-r--r--source/blender/collada/DocumentExporter.cpp12
2 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/collada/AnimationExporter.h b/source/blender/collada/AnimationExporter.h
index ea5fd203bea..60224151308 100644
--- a/source/blender/collada/AnimationExporter.h
+++ b/source/blender/collada/AnimationExporter.h
@@ -53,10 +53,6 @@ extern "C"
#include "BIK_api.h"
#include "BKE_global.h"
#include "ED_object.h"
-
-#ifdef NAN_BUILDINFO
-extern char build_rev[];
-#endif
}
#include "MEM_guardedalloc.h"
diff --git a/source/blender/collada/DocumentExporter.cpp b/source/blender/collada/DocumentExporter.cpp
index c03316e1fe5..9aa0f6e2831 100644
--- a/source/blender/collada/DocumentExporter.cpp
+++ b/source/blender/collada/DocumentExporter.cpp
@@ -101,7 +101,8 @@ extern "C"
#include "ED_keyframing.h"
#ifdef WITH_BUILDINFO
-extern char build_rev[];
+extern char build_change[];
+extern char build_hash[];
#endif
#include "MEM_guardedalloc.h"
@@ -226,7 +227,14 @@ void DocumentExporter::exportCurrentScene(Scene *sce)
}
char version_buf[128];
#ifdef WITH_BUILDINFO
- sprintf(version_buf, "Blender %d.%02d.%d r%s", BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_SUBVERSION, build_rev);
+ /* TODO(sergey): As soon as we fully switched to GIT, no need to check build_hash. */
+ if (build_hash[0] != '\0') {
+ sprintf(version_buf, "Blender %d.%02d.%d change:%s, hash:", BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_SUBVERSION,
+ build_change, build_hash);
+ }
+ else {
+ sprintf(version_buf, "Blender %d.%02d.%d r%s", BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_SUBVERSION, build_change);
+ }
#else
sprintf(version_buf, "Blender %d.%02d.%d", BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_SUBVERSION);
#endif