diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-04-21 22:23:28 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-04-21 22:23:28 (GMT) |
commit | dadd974d976cdf1311c4fb4d909d521e527c0cca (patch) | |
tree | 7d2a3e4ca7041c9766154b721b60bd02cc390901 /Source/CTest/cmCTestUpdateHandler.cxx | |
parent | 2f4e516e230c179cdf7c488f4101aae3a52ac53b (diff) | |
download | CMake-dadd974d976cdf1311c4fb4d909d521e527c0cca.zip CMake-dadd974d976cdf1311c4fb4d909d521e527c0cca.tar.gz CMake-dadd974d976cdf1311c4fb4d909d521e527c0cca.tar.bz2 |
ENH: Reorganize a bit and make sure to report an error if there are modified files or conflicts
Diffstat (limited to 'Source/CTest/cmCTestUpdateHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestUpdateHandler.cxx | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx index ffa9deb..2a29920 100644 --- a/Source/CTest/cmCTestUpdateHandler.cxx +++ b/Source/CTest/cmCTestUpdateHandler.cxx @@ -204,6 +204,7 @@ int cmCTestUpdateHandler::ProcessHandler() int count = 0; int updateType = e_CVS; std::string::size_type cc, kk; + bool updateProducedError = false; // Get source dir @@ -390,6 +391,10 @@ int cmCTestUpdateHandler::ProcessHandler() ofs << goutput << std::endl;; } } + if ( !res || retVal ) + { + updateProducedError = true; + } os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" << "<Update mode=\"Client\" Generator=\"ctest-" @@ -401,15 +406,7 @@ int cmCTestUpdateHandler::ProcessHandler() << m_CTest->GetTestModelString() << "</BuildStamp>" << std::endl; os << "\t<StartDateTime>" << start_time << "</StartDateTime>\n" << "\t<UpdateCommand>" << m_CTest->MakeXMLSafe(command) - << "</UpdateCommand>\n" - << "\t<UpdateReturnStatus>"; - if ( !res || retVal ) - { - os << "Update error: "; - os << m_CTest->MakeXMLSafe(goutput); - std::cerr << "Update with command: " << command << " failed" << std::endl; - } - os << "</UpdateReturnStatus>" << std::endl; + << "</UpdateCommand>\n"; // Even though it failed, we may have some useful information. Try to continue... std::vector<cmStdString> lines; @@ -806,8 +803,21 @@ int cmCTestUpdateHandler::ProcessHandler() os << "\t<EndDateTime>" << end_time << "</EndDateTime>\n" << "<ElapsedMinutes>" << static_cast<int>((cmSystemTools::GetTime() - elapsed_time_start)/6)/10.0 - << "</ElapsedMinutes>" - << "</Update>" << std::endl; + << "</ElapsedMinutes>\n" + << "\t<UpdateReturnStatus>"; + if ( num_modified > 0 || num_conflicting > 0 ) + { + os << "Update error: There are modified or conflicting files in the repository"; + std::cerr << " There are modified or conflicting files in the repository" << std::endl; + } + if ( !res || retVal ) + { + os << "Update error: "; + os << m_CTest->MakeXMLSafe(goutput); + std::cerr << " Update with command: " << command << " failed" << std::endl; + } + os << "</UpdateReturnStatus>" << std::endl; + os << "</Update>" << std::endl; if ( ofs ) { |