diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-11-04 17:21:39 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-11-04 17:21:39 +0400 |
commit | 2010c6ad6cae41b5f13b36339404ff60c98ae915 (patch) | |
tree | 543e34b74bf56ce9338f3ae0e029852cdd78905a /source/blender/collada/DocumentExporter.cpp | |
parent | d07f3f793b8c7596e36249d589aafcf63611cc1d (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/DocumentExporter.cpp')
-rw-r--r-- | source/blender/collada/DocumentExporter.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
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 |