[Cmake-commits] CMake branch, next, updated. v3.5.1-734-g0d43a91
Ben Boeckel
ben.boeckel at kitware.com
Thu Mar 31 12:36:00 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 0d43a919fd720c76808fc9bcd617363ba97b41c5 (commit)
via 8b38bf19a03a09896cb5f7e74d14c250acb8e802 (commit)
via d737a1a41c67a6034ed215f123af641d95308c1c (commit)
via b6a8e686ba1f709fc85a6d9790027a6d93fcb41f (commit)
via c8faf5b06ec39fedcb24e8880819ed91b48c2a62 (commit)
via 779086283cea69d25076149c4f0bab0855978865 (commit)
from 35bc416eff0a51f23c6cea368fb2f70d49969b64 (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=0d43a919fd720c76808fc9bcd617363ba97b41c5
commit 0d43a919fd720c76808fc9bcd617363ba97b41c5
Merge: 35bc416 8b38bf1
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Mar 31 12:35:59 2016 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Mar 31 12:35:59 2016 -0400
Merge topic 'ctest-run-submodule-sync' into next
8b38bf19 Help: add release notes for the branch
d737a1a4 cmCTestGIT: run `git submodule sync` before updating submodules
b6a8e686 cmCTestGIT: add an option to initialize submodules on update
c8faf5b0 cmCTestGIT: fix git version references
77908628 revert: revert back to the merge base
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8b38bf19a03a09896cb5f7e74d14c250acb8e802
commit 8b38bf19a03a09896cb5f7e74d14c250acb8e802
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Mar 31 12:31:56 2016 -0400
Commit: Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Thu Mar 31 12:35:26 2016 -0400
Help: add release notes for the branch
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=d737a1a41c67a6034ed215f123af641d95308c1c
commit d737a1a41c67a6034ed215f123af641d95308c1c
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Mar 31 12:30:42 2016 -0400
Commit: Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Thu Mar 31 12:35:25 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 c8e1394..38eadad 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=b6a8e686ba1f709fc85a6d9790027a6d93fcb41f
commit b6a8e686ba1f709fc85a6d9790027a6d93fcb41f
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Mar 31 12:28:46 2016 -0400
Commit: Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Thu Mar 31 12:35:25 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..14ac5dd 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -407,7 +407,8 @@ Variables for CTest
/variable/CTEST_DROP_SITE_USER
/variable/CTEST_EXTRA_COVERAGE_GLOB
/variable/CTEST_GIT_COMMAND
- /variable/CTEST_GIT_UPDATE_CUSTOM
+ /variable/CTEST_GIT_INIT_SUBMODULES
+ /variable/CTEST_GIT_UPDATE_OPTIONS
/variable/CTEST_GIT_UPDATE_OPTIONS
/variable/CTEST_HG_COMMAND
/variable/CTEST_HG_UPDATE_OPTIONS
diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst
index 2fdf7f3..ede4b78 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: ``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/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx
index da086be..c8e1394 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))
+ {
+ 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=c8faf5b06ec39fedcb24e8880819ed91b48c2a62
commit c8faf5b06ec39fedcb24e8880819ed91b48c2a62
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Mar 31 12:31:31 2016 -0400
Commit: Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Thu Mar 31 12:35:25 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";
}
}
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=779086283cea69d25076149c4f0bab0855978865
commit 779086283cea69d25076149c4f0bab0855978865
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Mar 31 12:27:37 2016 -0400
Commit: Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Thu Mar 31 12:34:42 2016 -0400
revert: revert back to the merge base
The code changes are better split into different commits at this point.
diff --git a/Help/release/dev/ctest-run-submodule-sync.rst b/Help/release/dev/ctest-run-submodule-sync.rst
deleted file mode 100644
index 55e87c0..0000000
--- a/Help/release/dev/ctest-run-submodule-sync.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-ctest-run-submodule-sync
-------------------------
-
-* The :command:`ctest_update` command will now initialize and synchronize
- submodules on an update. Updates which add submodules or change a
- submodule's URL will now be pulled properly.
diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx
index ee462f8..bbb3b9d 100644
--- a/Source/CTest/cmCTestGIT.cxx
+++ b/Source/CTest/cmCTestGIT.cxx
@@ -273,53 +273,21 @@ 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
+ // Git < 1.6.5.0 did not support --recursive
if(this->GetGitVersion() < cmCTestGITVersion(1,6,5,0))
{
recursive = 0;
- // No need to require >= 1.6.5 if there are no submodules.
+ // No need to require >= 1.6.5.0 if there are no submodules.
if(cmSystemTools::FileExists((top_dir + "/.gitmodules").c_str()))
{
- this->Log << "Git < 1.6.5 cannot update submodules recursively\n";
- }
- }
-
- // 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";
+ this->Log << "Git < 1.6.5.0 cannot update submodules recursively\n";
}
}
+ char const* git_submodule[] = {git, "submodule", "update", recursive, 0};
OutputLogger submodule_out(this->Log, "submodule-out> ");
OutputLogger submodule_err(this->Log, "submodule-err> ");
-
- char const* git_submodule_init[] = {git, "submodule", "init", 0};
- bool ret = this->RunChild(git_submodule_init, &submodule_out, &submodule_err,
- top_dir.c_str());
-
- if (!ret)
- {
- return false;
- }
-
- 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());
}
-----------------------------------------------------------------------
Summary of changes:
Help/manual/cmake-variables.7.rst | 3 ++-
Help/manual/ctest.1.rst | 6 ++++++
Help/release/dev/ctest-run-submodule-sync.rst | 9 ++++++---
...VERSION_ONLY.rst => CTEST_GIT_INIT_SUBMODULES.rst} | 4 ++--
Source/CTest/cmCTestGIT.cxx | 17 ++++++++++++-----
Source/CTest/cmCTestUpdateCommand.cxx | 2 ++
6 files changed, 30 insertions(+), 11 deletions(-)
copy Help/variable/{CTEST_UPDATE_VERSION_ONLY.rst => CTEST_GIT_INIT_SUBMODULES.rst} (50%)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list