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-15 15:11:59 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-11-15 16:05:27 +0400
commit927dea436ee47e4dcabcde8eb4b167f0c32a08f2 (patch)
tree9e35618a41b1eb372ec9bb59d7d316909df9bb5c /source/blender/collada/DocumentExporter.cpp
parent825b0e8bc422174965ed8c0376d3d25b4f923394 (diff)
Further tweaks to buildinfo
Summary: Old idea with changes since previous release tag didn't work good enough. In most of the cases tag was done in a branch hence not actually reachable from the master branch. Now change since release is gone, and date of the latest commit is used instead. The date is displayed in format YYYY-MM-DD HH:mm in the splash. New bpy.app fields: - build_commit_timestamp is an unix timestamp of the commit blender was build from. - build_commit_date is a date of that commit. - build_commit_time is a time of that commit. Reviewers: campbellbarton Differential Revision: http://developer.blender.org/D5
Diffstat (limited to 'source/blender/collada/DocumentExporter.cpp')
-rw-r--r--source/blender/collada/DocumentExporter.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/source/blender/collada/DocumentExporter.cpp b/source/blender/collada/DocumentExporter.cpp
index 9aa0f6e2831..9d590968481 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_change[];
+extern char build_commit_date[];
+extern char build_commit_time[];
extern char build_hash[];
#endif
@@ -227,16 +228,12 @@ void DocumentExporter::exportCurrentScene(Scene *sce)
}
char version_buf[128];
#ifdef WITH_BUILDINFO
- /* 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);
- }
+ BLI_snprintf(version_buf, sizeof(version_buf), "Blender %d.%02d.%d commit date:%s, hash:",
+ BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_SUBVERSION,
+ build_commit_date, blender_commit_time, build_hash);
#else
- sprintf(version_buf, "Blender %d.%02d.%d", BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_SUBVERSION);
+ BLI_snprintf(version_buf, sizeof(version_buf), "Blender %d.%02d.%d",
+ BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_SUBVERSION);
#endif
asset.getContributor().mAuthoringTool = version_buf;
asset.add();