summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestUpdateHandler.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-02-24 15:39:55 (GMT)
committerBrad King <brad.king@kitware.com>2009-02-24 15:39:55 (GMT)
commit6bdc2b5d99313ab6418b07ff91320135907ac261 (patch)
treebf6c9386a7987ac5147e7d37a3d0372468dc24ac /Source/CTest/cmCTestUpdateHandler.cxx
parent1b8ea27bd10c9ac94d190a3eb9be5fa0c955b453 (diff)
downloadCMake-6bdc2b5d99313ab6418b07ff91320135907ac261.zip
CMake-6bdc2b5d99313ab6418b07ff91320135907ac261.tar.gz
CMake-6bdc2b5d99313ab6418b07ff91320135907ac261.tar.bz2
ENH: Add cmCTestCVS and cmCTestSVN
These cmCTestVC subclasses will implement interaction with CVS and SVN tools.
Diffstat (limited to 'Source/CTest/cmCTestUpdateHandler.cxx')
-rw-r--r--Source/CTest/cmCTestUpdateHandler.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx
index 014e16d..cce8f2f 100644
--- a/Source/CTest/cmCTestUpdateHandler.cxx
+++ b/Source/CTest/cmCTestUpdateHandler.cxx
@@ -27,6 +27,12 @@
#include "cmXMLParser.h"
#include "cmXMLSafe.h"
+#include "cmCTestVC.h"
+#include "cmCTestCVS.h"
+#include "cmCTestSVN.h"
+
+#include <cmsys/auto_ptr.hxx>
+
//#include <cmsys/RegularExpression.hxx>
#include <cmsys/Process.h>
@@ -323,6 +329,17 @@ int cmCTestUpdateHandler::ProcessHandler()
<< " repository type"
<< std::endl;);
+ // Create an object to interact with the VCS tool.
+ cmsys::auto_ptr<cmCTestVC> vc;
+ switch (this->UpdateType)
+ {
+ case e_CVS: vc.reset(new cmCTestCVS(this->CTest, ofs)); break;
+ case e_SVN: vc.reset(new cmCTestSVN(this->CTest, ofs)); break;
+ default: vc.reset(new cmCTestVC(this->CTest, ofs)); break;
+ }
+ vc->SetCommandLineTool(this->UpdateCommand);
+ vc->SetSourceDirectory(sourceDirectory);
+
// And update options
std::string updateOptions
= this->CTest->GetCTestConfiguration("UpdateOptions");