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-19 20:01:43 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-11-19 20:22:21 +0400
commit50fbebe0a443d10b3b5525c9a7e152acc32b4527 (patch)
tree2aabfd0e8efc73563c9adce60a654bfb1d6a4c00 /build_files/scons/tools
parent5743a6e36458874be1fe992a361ce493edbee5a4 (diff)
Buildinfo fixes
- Use -M suffix if working tree does have uncommitted modifications. - Local commits are considered local changes as well
Diffstat (limited to 'build_files/scons/tools')
-rw-r--r--build_files/scons/tools/Blender.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index e750ce09aff..894c8dbca25 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -421,6 +421,22 @@ def buildinfo(lenv, build_type):
else:
build_hash = os.popen('git rev-parse --short HEAD').read().strip()
build_branch = os.popen('git rev-parse --abbrev-ref HEAD').read().strip()
+
+ # ## Check for local modifications
+ has_local_changes = False
+
+ # Update GIT index before getting dirty files
+ os.system('git update-index -q --refresh')
+ changed_files = os.popen('git diff-index --name-only HEAD --').read().strip()
+
+ if changed_files:
+ has_local_changes = True
+ else:
+ unpushed_log = os.popen('git log @{u}..').read().strip()
+ has_local_changes = unpushed_log != ''
+
+ if has_local_changes:
+ build_branch += ' (modified)'
else:
build_hash = 'unknown'
build_commit_timestamp = '0'