[Cmake-commits] CMake branch, next, updated. v3.5.1-793-g41abf18
Brad King
brad.king at kitware.com
Fri Apr 1 15:52:33 EDT 2016
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 41abf1828417479588d428032d4639fae53efe53 (commit)
via c18d91add836f7ce426fcb59b2c65235898f3979 (commit)
via 7f5607439ed0d1303265d3db0937e90683e698de (commit)
via 06b310b5d5d8a38fb17df02fee8df750904cfcd0 (commit)
via 56c1ea40c5e278155025f3823089e2d0fa34054a (commit)
from 3b472a4ef95fa7441978a49e3d7684b165e94f99 (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=41abf1828417479588d428032d4639fae53efe53
commit 41abf1828417479588d428032d4639fae53efe53
Merge: 3b472a4 c18d91a
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Apr 1 15:52:32 2016 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Apr 1 15:52:32 2016 -0400
Merge topic 'ctest-run-submodule-sync' into next
c18d91ad Help: add release notes for topic 'ctest-run-submodule-sync'
7f560743 cmCTestGIT: run `git submodule sync` before updating submodules
06b310b5 cmCTestGIT: add an option to initialize submodules on update
56c1ea40 cmCTestGIT: fix git version references
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c18d91add836f7ce426fcb59b2c65235898f3979
commit c18d91add836f7ce426fcb59b2c65235898f3979
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Mar 31 12:31:56 2016 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Apr 1 15:51:46 2016 -0400
Help: add release notes for topic 'ctest-run-submodule-sync'
diff --git a/Help/release/dev/ctest-run-submodule-sync.rst b/Help/release/dev/ctest-run-submodule-sync.rst
new file mode 100644
index 0000000..c41cc2f
--- /dev/null
+++ b/Help/release/dev/ctest-run-submodule-sync.rst
@@ -0,0 +1,9 @@
+ctest-run-submodule-sync
+------------------------
+
+* The :command:`ctest_update` command now looks at the
+ :variable:`CTEST_GIT_INIT_SUBMODULES` variable to determine whether
+ submodules should be updated or not before updating.
+* The :command:`ctest_update` command will now synchronize submodules on an
+ update. Updates which add submodules or change a submodule's URL will now be
+ pulled properly.
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f5607439ed0d1303265d3db0937e90683e698de
commit 7f5607439ed0d1303265d3db0937e90683e698de
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Mar 31 12:30:42 2016 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Apr 1 15:50:31 2016 -0400
cmCTestGIT: run `git submodule sync` before updating submodules
If the URL of a submodule changes upstream, the commits referenced at
the old URL may not be available and will cause an update failure.
diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx
index 9ee18e6..1d6bdce 100644
--- a/Source/CTest/cmCTestGIT.cxx
+++ b/Source/CTest/cmCTestGIT.cxx
@@ -273,6 +273,7 @@ bool cmCTestGIT::UpdateImpl()
std::string top_dir = this->FindTopDir();
const char* git = this->CommandLineTool.c_str();
const char* recursive = "--recursive";
+ const char* sync_recursive = "--recursive";
// Git < 1.6.5 did not support submodule --recursive
if(this->GetGitVersion() < cmCTestGITVersion(1,6,5,0))
@@ -285,6 +286,17 @@ bool cmCTestGIT::UpdateImpl()
}
}
+ // Git < 1.8.1 did not support sync --recursive
+ if(this->GetGitVersion() < cmCTestGITVersion(1,8,1,0))
+ {
+ sync_recursive = 0;
+ // No need to require >= 1.8.1 if there are no submodules.
+ if(cmSystemTools::FileExists((top_dir + "/.gitmodules").c_str()))
+ {
+ this->Log << "Git < 1.8.1 cannot synchronize submodules recursively\n";
+ }
+ }
+
OutputLogger submodule_out(this->Log, "submodule-out> ");
OutputLogger submodule_err(this->Log, "submodule-err> ");
@@ -304,6 +316,16 @@ bool cmCTestGIT::UpdateImpl()
}
}
+ char const* git_submodule_sync[] = {git, "submodule", "sync",
+ sync_recursive, 0};
+ ret = this->RunChild(git_submodule_sync, &submodule_out, &submodule_err,
+ top_dir.c_str());
+
+ if (!ret)
+ {
+ return false;
+ }
+
char const* git_submodule[] = {git, "submodule", "update", recursive, 0};
return this->RunChild(git_submodule, &submodule_out, &submodule_err,
top_dir.c_str());
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=06b310b5d5d8a38fb17df02fee8df750904cfcd0
commit 06b310b5d5d8a38fb17df02fee8df750904cfcd0
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Mar 31 12:28:46 2016 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Apr 1 15:50:31 2016 -0400
cmCTestGIT: add an option to initialize submodules on update
Currently, CTest will not initialize any submodules within the already
checked out source tree. Add an option to do so. The use case for not
doing so is that some submodules may not be necessary for the current
test and keeping network usage down may be important.
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 5fd5c5c..3f73b32 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -407,6 +407,7 @@ Variables for CTest
/variable/CTEST_DROP_SITE_USER
/variable/CTEST_EXTRA_COVERAGE_GLOB
/variable/CTEST_GIT_COMMAND
+ /variable/CTEST_GIT_INIT_SUBMODULES
/variable/CTEST_GIT_UPDATE_CUSTOM
/variable/CTEST_GIT_UPDATE_OPTIONS
/variable/CTEST_HG_COMMAND
diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst
index 2fdf7f3..1179f56 100644
--- a/Help/manual/ctest.1.rst
+++ b/Help/manual/ctest.1.rst
@@ -589,6 +589,12 @@ Configuration settings to specify the version control tool include:
* `CTest Script`_ variable: :variable:`CTEST_GIT_COMMAND`
* :module:`CTest` module variable: ``GITCOMMAND``
+``GITInitSubmodules``
+ If set, CTest will update the repository's submodules before updating.
+
+ * `CTest Script`_ variable: :variable:`CTEST_GIT_INIT_SUBMODULES`
+ * :module:`CTest` module variable: ``CTEST_GIT_INIT_SUBMODULES``
+
``GITUpdateCustom``
Specify a custom command line (as a semicolon-separated list) to run
in the source tree (Git work tree) to update it instead of running
diff --git a/Help/variable/CTEST_GIT_INIT_SUBMODULES.rst b/Help/variable/CTEST_GIT_INIT_SUBMODULES.rst
new file mode 100644
index 0000000..fd27003
--- /dev/null
+++ b/Help/variable/CTEST_GIT_INIT_SUBMODULES.rst
@@ -0,0 +1,5 @@
+CTEST_GIT_INIT_SUBMODULES
+-------------------------
+
+Specify the CTest ``GITInitSubmodules`` setting
+in a :manual:`ctest(1)` dashboard client script.
diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in
index 2da8354..0ff2eed 100644
--- a/Modules/DartConfiguration.tcl.in
+++ b/Modules/DartConfiguration.tcl.in
@@ -52,6 +52,7 @@ SVNUpdateOptions: @SVN_UPDATE_OPTIONS@
# Git options
GITCommand: @GITCOMMAND@
+GITInitSubmodules: @CTEST_GIT_INIT_SUBMODULES@
GITUpdateOptions: @GIT_UPDATE_OPTIONS@
GITUpdateCustom: @CTEST_GIT_UPDATE_CUSTOM@
diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx
index da086be..9ee18e6 100644
--- a/Source/CTest/cmCTestGIT.cxx
+++ b/Source/CTest/cmCTestGIT.cxx
@@ -285,9 +285,26 @@ bool cmCTestGIT::UpdateImpl()
}
}
- char const* git_submodule[] = {git, "submodule", "update", recursive, 0};
OutputLogger submodule_out(this->Log, "submodule-out> ");
OutputLogger submodule_err(this->Log, "submodule-err> ");
+
+ bool ret;
+
+ std::string init_submodules =
+ this->CTest->GetCTestConfiguration("GITInitSubmodules");
+ if (cmSystemTools::IsOn(init_submodules.c_str()))
+ {
+ char const* git_submodule_init[] = {git, "submodule", "init", 0};
+ ret = this->RunChild(git_submodule_init, &submodule_out, &submodule_err,
+ top_dir.c_str());
+
+ if (!ret)
+ {
+ return false;
+ }
+ }
+
+ char const* git_submodule[] = {git, "submodule", "update", recursive, 0};
return this->RunChild(git_submodule, &submodule_out, &submodule_err,
top_dir.c_str());
}
diff --git a/Source/CTest/cmCTestUpdateCommand.cxx b/Source/CTest/cmCTestUpdateCommand.cxx
index dfda9f1..1bf60fc 100644
--- a/Source/CTest/cmCTestUpdateCommand.cxx
+++ b/Source/CTest/cmCTestUpdateCommand.cxx
@@ -55,6 +55,8 @@ cmCTestGenericHandler* cmCTestUpdateCommand::InitializeHandler()
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"GITUpdateOptions", "CTEST_GIT_UPDATE_OPTIONS", this->Quiet);
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
+ "GITInitSubmodules", "CTEST_GIT_INIT_SUBMODULES", this->Quiet);
+ this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"GITUpdateCustom", "CTEST_GIT_UPDATE_CUSTOM", this->Quiet);
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"UpdateVersionOnly", "CTEST_UPDATE_VERSION_ONLY", this->Quiet);
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=56c1ea40c5e278155025f3823089e2d0fa34054a
commit 56c1ea40c5e278155025f3823089e2d0fa34054a
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Mar 31 12:31:31 2016 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Apr 1 15:50:27 2016 -0400
cmCTestGIT: fix git version references
Git does not use a 4-component version number.
diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx
index bbb3b9d..da086be 100644
--- a/Source/CTest/cmCTestGIT.cxx
+++ b/Source/CTest/cmCTestGIT.cxx
@@ -274,14 +274,14 @@ bool cmCTestGIT::UpdateImpl()
const char* git = this->CommandLineTool.c_str();
const char* recursive = "--recursive";
- // Git < 1.6.5.0 did not support --recursive
+ // Git < 1.6.5 did not support submodule --recursive
if(this->GetGitVersion() < cmCTestGITVersion(1,6,5,0))
{
recursive = 0;
- // No need to require >= 1.6.5.0 if there are no submodules.
+ // No need to require >= 1.6.5 if there are no submodules.
if(cmSystemTools::FileExists((top_dir + "/.gitmodules").c_str()))
{
- this->Log << "Git < 1.6.5.0 cannot update submodules recursively\n";
+ this->Log << "Git < 1.6.5 cannot update submodules recursively\n";
}
}
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list