diff options
author | Brad King <brad.king@kitware.com> | 2009-02-24 17:50:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-02-24 17:50:15 (GMT) |
commit | fdd0d2a32bffc3742b5d40c066a61794135bd6f4 (patch) | |
tree | 6c2e02dfb74118bb869bee0daef1e049124bc836 /Source/CTest/cmCTestUpdateHandler.cxx | |
parent | 4e4f2a3a10327978c8de493fe0f411e656b7d2f9 (diff) | |
download | CMake-fdd0d2a32bffc3742b5d40c066a61794135bd6f4.zip CMake-fdd0d2a32bffc3742b5d40c066a61794135bd6f4.tar.gz CMake-fdd0d2a32bffc3742b5d40c066a61794135bd6f4.tar.bz2 |
ENH: Factor out svn work tree cleanup
This removes work tree cleanup from cmCTestUpdateHandler and adds an
interface for it in cmCTestVC with an implementation in cmCTestSVN.
Diffstat (limited to 'Source/CTest/cmCTestUpdateHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestUpdateHandler.cxx | 45 |
1 files changed, 3 insertions, 42 deletions
diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx index cce8f2f..e2cc0f7 100644 --- a/Source/CTest/cmCTestUpdateHandler.cxx +++ b/Source/CTest/cmCTestUpdateHandler.cxx @@ -389,6 +389,9 @@ int cmCTestUpdateHandler::ProcessHandler() } } + // Cleanup the working tree. + vc->Cleanup(); + bool res = true; // First, check what the current state of repository is @@ -399,48 +402,6 @@ int cmCTestUpdateHandler::ProcessHandler() // TODO: CVS - for now just leave empty break; case cmCTestUpdateHandler::e_SVN: - command = "\"" + this->UpdateCommand + "\" cleanup"; - break; - } - - // - // Get initial repository information if that is possible. With subversion, - // this will check the current revision. - // - if ( !command.empty() ) - { - cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, - "* Cleanup repository: " << command.c_str() << std::endl); - if ( !this->CTest->GetShowOnly() ) - { - ofs << "* Cleanup repository" << std::endl; - ofs << " Command: " << command.c_str() << std::endl; - res = this->CTest->RunCommand(command.c_str(), &goutput, &errors, - &retVal, sourceDirectory, 0 /*this->TimeOut*/); - - ofs << " Output: " << goutput.c_str() << std::endl; - ofs << " Errors: " << errors.c_str() << std::endl; - if ( ofs ) - { - ofs << "--- Cleanup ---" << std::endl; - ofs << goutput << std::endl; - } - } - else - { - cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, - "Cleanup with command: " << command << std::endl); - } - } - - // First, check what the current state of repository is - command = ""; - switch( this->UpdateType ) - { - case cmCTestUpdateHandler::e_CVS: - // TODO: CVS - for now just leave empty - break; - case cmCTestUpdateHandler::e_SVN: command = "\"" + this->UpdateCommand + "\" info"; break; } |