diff options
author | Brad King <brad.king@kitware.com> | 2009-12-18 13:13:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-12-18 13:13:51 (GMT) |
commit | a73833d03742c504a6b8927cc276d5e34e1aeab2 (patch) | |
tree | 3d15b0ffc4de2534ec35d840b82f8fb1485e7fcc /Source/CTest/cmCTestGlobalVC.cxx | |
parent | 449b9aea23442de90e54ecc506a34257f4d3783e (diff) | |
download | CMake-a73833d03742c504a6b8927cc276d5e34e1aeab2.zip CMake-a73833d03742c504a6b8927cc276d5e34e1aeab2.tar.gz CMake-a73833d03742c504a6b8927cc276d5e34e1aeab2.tar.bz2 |
Submit global tree revision in Update.xml
We teach CTest to report in a <Revision> element the revision of the
source tree that was tested. This makes sense for all modern VCS tools
because they version the whole tree. We simply omit this element for
CVS because it only versions files. See issue #7541.
Diffstat (limited to 'Source/CTest/cmCTestGlobalVC.cxx')
-rw-r--r-- | Source/CTest/cmCTestGlobalVC.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestGlobalVC.cxx b/Source/CTest/cmCTestGlobalVC.cxx index 73a36da..8c51102 100644 --- a/Source/CTest/cmCTestGlobalVC.cxx +++ b/Source/CTest/cmCTestGlobalVC.cxx @@ -107,6 +107,19 @@ void cmCTestGlobalVC::WriteXMLDirectory(std::ostream& xml, } //---------------------------------------------------------------------------- +void cmCTestGlobalVC::WriteXMLGlobal(std::ostream& xml) +{ + if(!this->NewRevision.empty()) + { + xml << "\t<Revision>" << this->NewRevision << "</Revision>\n"; + } + if(!this->OldRevision.empty() && this->OldRevision != this->NewRevision) + { + xml << "\t<PriorRevision>" << this->OldRevision << "</PriorRevision>\n"; + } +} + +//---------------------------------------------------------------------------- bool cmCTestGlobalVC::WriteXMLUpdates(std::ostream& xml) { cmCTestLog(this->CTest, HANDLER_OUTPUT, @@ -117,6 +130,8 @@ bool cmCTestGlobalVC::WriteXMLUpdates(std::ostream& xml) this->LoadModifications(); + this->WriteXMLGlobal(xml); + for(std::map<cmStdString, Directory>::const_iterator di = this->Dirs.begin(); di != this->Dirs.end(); ++di) { |