summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-03-15 14:23:35 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-03-15 14:23:35 (GMT)
commit609af5c969be6edf087498f983ccd7d3ac818a48 (patch)
treeda2eb4478e3822e9070d841169a9c4777274b2dc /Source/CTest
parente48dc064022611e2fd86d5756c97e61bdb663822 (diff)
downloadCMake-609af5c969be6edf087498f983ccd7d3ac818a48.zip
CMake-609af5c969be6edf087498f983ccd7d3ac818a48.tar.gz
CMake-609af5c969be6edf087498f983ccd7d3ac818a48.tar.bz2
ENH: Add svn cleanup before running svn
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestUpdateHandler.cxx53
1 files changed, 47 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx
index b14ece5..7329a8d 100644
--- a/Source/CTest/cmCTestUpdateHandler.cxx
+++ b/Source/CTest/cmCTestUpdateHandler.cxx
@@ -407,6 +407,8 @@ int cmCTestUpdateHandler::ProcessHandler()
}
}
+ bool res = true;
+
updateCommand = "\"" + updateCommand + "\"";
// First, check what the current state of repository is
@@ -417,6 +419,48 @@ int cmCTestUpdateHandler::ProcessHandler()
// TODO: CVS - for now just leave empty
break;
case cmCTestUpdateHandler::e_SVN:
+ command = 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( updateType )
+ {
+ case cmCTestUpdateHandler::e_CVS:
+ // TODO: CVS - for now just leave empty
+ break;
+ case cmCTestUpdateHandler::e_SVN:
command = updateCommand + " info";
break;
}
@@ -427,17 +471,14 @@ int cmCTestUpdateHandler::ProcessHandler()
int svn_latest_revision = 0;
int svn_use_status = 0;
- bool res = true;
-
-
//
// 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,
- "* Get repository information: " << command.c_str() << std::endl);
+ cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ "* Get repository information: " << command.c_str() << std::endl);
if ( !this->CTest->GetShowOnly() )
{
ofs << "* Get repository information" << std::endl;
@@ -477,7 +518,7 @@ int cmCTestUpdateHandler::ProcessHandler()
else
{
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
- "Update with command: " << command << std::endl);
+ "Get information with command: " << command << std::endl);
}
}