[Cmake-commits] CMake branch, next, updated. v3.7.2-2457-g17e5230

Brad King brad.king at kitware.com
Tue Jan 31 11:16:26 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  17e5230ea6f68587ee2eda1145ef086d564e1229 (commit)
       via  3288ab0c78057e2388b247d326dc80011488a0bb (commit)
       via  773df0e2d7596d84a711914f1cffb4fb5a107c17 (commit)
      from  2a99491734ddf8a879ab7ca6492373cf072031d4 (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=17e5230ea6f68587ee2eda1145ef086d564e1229
commit 17e5230ea6f68587ee2eda1145ef086d564e1229
Merge: 2a99491 3288ab0
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 31 11:16:26 2017 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jan 31 11:16:26 2017 -0500

    Merge topic 'developer-setup' into next
    
    3288ab0c Convert local hook configuration to a Git config file format
    773df0e2 Add pre-commit hook to check whether SetupForDevelopment must re-run


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3288ab0c78057e2388b247d326dc80011488a0bb
commit 3288ab0c78057e2388b247d326dc80011488a0bb
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 11:16:10 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=773df0e2d7596d84a711914f1cffb4fb5a107c17
commit 773df0e2d7596d84a711914f1cffb4fb5a107c17
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 11:16:10 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..b63ae5e 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 development 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/post-receive
-- 
CMake


More information about the Cmake-commits mailing list