[Cmake-commits] CMake branch, next, updated. v3.7.2-2452-g3a61f7e

Brad King brad.king at kitware.com
Tue Jan 31 11:01:01 EST 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  3a61f7e8e2ec578a9512dd3599088d8d24f158dd (commit)
       via  e93b76ec1e916a4546dee8f8735b4115f16b201c (commit)
       via  3c97335df6f03f4c9737f75eaff65e9ba2e718ec (commit)
      from  4407ab5ece0abb662b86a53bc651651141c4b162 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3a61f7e8e2ec578a9512dd3599088d8d24f158dd
commit 3a61f7e8e2ec578a9512dd3599088d8d24f158dd
Merge: 4407ab5 e93b76e
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 31 11:00:59 2017 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jan 31 11:00:59 2017 -0500

    Merge topic 'developer-setup' into next
    
    e93b76ec Convert local hook configuration to a Git config file format
    3c97335d Add pre-commit hook to check whether SetupForDevelopment must re-run


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e93b76ec1e916a4546dee8f8735b4115f16b201c
commit e93b76ec1e916a4546dee8f8735b4115f16b201c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 31 10:56:35 2017 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Jan 31 10:59:38 2017 -0500

    Convert local hook configuration to a Git config file format
    
    The `git config` format is cleaner than a bash script and is also
    supported by our `hooks` branch to specify CMake-specific hooks.

diff --git a/.hooks-config.bash b/.hooks-config
similarity index 61%
rename from .hooks-config.bash
rename to .hooks-config
index ea9342a..064371c 100644
--- a/.hooks-config.bash
+++ b/.hooks-config
@@ -4,6 +4,7 @@
 # Loaded by .git/hooks/(pre-commit|commit-msg|prepare-commit-msg)
 # during git commit after local hooks have been installed.
 
-hooks_chain_pre_commit="Utilities/Git/pre-commit"
-hooks_chain_commit_msg="Utilities/Git/commit-msg"
-hooks_chain_prepare_commit_msg="Utilities/Git/prepare-commit-msg"
+[hooks "chain"]
+	pre-commit = Utilities/Git/pre-commit
+	commit-msg = Utilities/Git/commit-msg
+	prepare-commit-msg = Utilities/Git/prepare-commit-msg

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3c97335df6f03f4c9737f75eaff65e9ba2e718ec
commit 3c97335df6f03f4c9737f75eaff65e9ba2e718ec
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 31 10:51:46 2017 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Jan 31 10:59:38 2017 -0500

    Add pre-commit hook to check whether SetupForDevelopment must re-run
    
    Add a version number to the `SetupForDevelopment.sh` script and use
    a pre-commit hook to check when it changes.

diff --git a/Utilities/Git/pre-commit b/Utilities/Git/pre-commit
index b232ac0..2ec78f4 100755
--- a/Utilities/Git/pre-commit
+++ b/Utilities/Git/pre-commit
@@ -29,6 +29,19 @@ die 'The following changes add lines too long for our C++ style:
 
 Use lines strictly less than '"$line_too_long"' characters in C++ code.'
 
+#-----------------------------------------------------------------------------
+
+# Check that developmer setup is up-to-date.
+lastSetupForDevelopment=$(git config --get hooks.SetupForDevelopment || echo 0)
+eval $(grep '^SetupForDevelopment_VERSION=' "${BASH_SOURCE%/*}/../SetupForDevelopment.sh")
+test -n "$SetupForDevelopment_VERSION" || SetupForDevelopment_VERSION=0
+if test $lastSetupForDevelopment -lt $SetupForDevelopment_VERSION; then
+  die 'Developer setup in this work tree is out of date.  Please re-run
+
+  Utilities/SetupForDevelopment.sh
+'
+fi
+
 #-------------------------------------------------------------------------------
 if test -z "$HOOKS_ALLOW_KWSYS"; then
   # Disallow changes to KWSys
diff --git a/Utilities/SetupForDevelopment.sh b/Utilities/SetupForDevelopment.sh
index 0a9df7e..39152bc 100755
--- a/Utilities/SetupForDevelopment.sh
+++ b/Utilities/SetupForDevelopment.sh
@@ -11,3 +11,7 @@ Utilities/GitSetup/tips
 # Rebase master by default
 git config rebase.stat true
 git config branch.master.rebase true
+
+# Record the version of this setup so Git/pre-commit can check it.
+SetupForDevelopment_VERSION=1
+git config hooks.SetupForDevelopment ${SetupForDevelopment_VERSION}

-----------------------------------------------------------------------

Summary of changes:
 .hooks-config.bash => .hooks-config |    7 ++++---
 Utilities/Git/pre-commit            |   13 +++++++++++++
 Utilities/SetupForDevelopment.sh    |    4 ++++
 3 files changed, 21 insertions(+), 3 deletions(-)
 rename .hooks-config.bash => .hooks-config (61%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list