The following issue has been SUBMITTED.
======================================================================
https://public.kitware.com/Bug/view.php?id=15512
======================================================================
Reported By: trsystran
Assigned To:
======================================================================
Project: CMake
Issue ID: 15512
Category: CTest
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2015-04-13 11:56 EDT
Last Modified: 2015-04-13 11:56 EDT
======================================================================
Summary: CTest git update to specific commit reivision /
CTEST_GIT_UPDATE_CUSTOM with multiple git commands
Description:
Scenario:
Update in ctest the source git checkout to a given git commit revision (sha-1).
It's currently not possible to do that.
* GITUpdateOptions is only appended to "git" "fetch", then a "git" "reset"
"--hard" to FETCH_HEAD is done, and "git fetch" only takes refspec, not sha-1
commit revisions, so set(CTEST_GIT_UPDATE_OPTIONS "origin ${REVISION}") doesn't
work
* GITUpdateCustom takes only *one* command-line, contrary to what the ctest
manual says ("Specify a semicolon-separated list of custom command lines to run
in the source tree (Git work tree) to update it instead of running the
GITCommand.")
The code (in 2.8.12.2 and 3.2.1, it didn't change) split on ';', then adds each
token as an argument of one process execution, not multiple command lines as
documented.
So it's not possible do this:
set(CTEST_GIT_UPDATE_CUSTOM "git fetch" "git reset --hard ${REVISION}")
because it will try to execute "git fetch" program, instead of "git".
I haven't found a way to do fetch + reset on a given commit revision in one
command (git fetch and git pull take refspec, not revisions, and git rebase take
just branches).
Two issues here:
1/ improve documentation to remove the plural mark on "command line" to reflect
the current behavior (it's the same wording and issue for P4)
2/ find a solution to update to a given git commit revision (changing
CTEST_GIT_UPDATE_CUSTOM behavior to match the documentation would be a breaking
change, so it's not the solution.)
Additional Information:
With SVN it symply works with set(CTEST_SVN_UPDATE_OPTIONS "-r${REVISION}")
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2015-04-13 11:56 trsystran New Issue
======================================================================
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers