View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015512 | CMake | CTest | public | 2015-04-13 11:56 | 2015-11-02 09:13 | ||||
Reporter | trsystran | ||||||||
Assigned To | |||||||||
Priority | normal | Severity | text | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 3.2.1 | ||||||||
Target Version | CMake 3.3 | Fixed in Version | CMake 3.3 | ||||||
Summary | 0015512: Fix CTEST_GIT_UPDATE_CUSTOM documentation | ||||||||
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}") | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0038496) Brad King (manager) 2015-04-13 13:02 |
I've fixed the documentation, which was just written incorrectly when added: Help: Fix {GIT,P4}UpdateCustom documentation http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fef1f267 [^] |
(0038498) Brad King (manager) 2015-04-13 13:04 |
When GITUpdateCustom was first added the intention was for it to be the minimum needed for a hook in the right spot. One can use it to invoke another script to do arbitrarily complex logic for the update. |
(0038499) trsystran (reporter) 2015-04-13 13:11 |
Okay, the script will do. I consider this issue resolved, thanks! |
(0039769) Robert Maynard (manager) 2015-11-02 09:13 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2015-04-13 11:56 | trsystran | New Issue | |
2015-04-13 12:49 | Brad King | Relationship added | related to 0014581 |
2015-04-13 13:02 | Brad King | Note Added: 0038496 | |
2015-04-13 13:04 | Brad King | Note Added: 0038498 | |
2015-04-13 13:11 | trsystran | Note Added: 0038499 | |
2015-04-13 14:10 | Brad King | Severity | minor => text |
2015-04-13 14:10 | Brad King | Status | new => resolved |
2015-04-13 14:10 | Brad King | Resolution | open => fixed |
2015-04-13 14:10 | Brad King | Fixed in Version | => CMake 3.3 |
2015-04-13 14:10 | Brad King | Target Version | => CMake 3.3 |
2015-04-13 14:10 | Brad King | Summary | CTest git update to specific commit reivision / CTEST_GIT_UPDATE_CUSTOM with multiple git commands => Fix CTEST_GIT_UPDATE_CUSTOM documentation |
2015-11-02 09:13 | Robert Maynard | Note Added: 0039769 | |
2015-11-02 09:13 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |