summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestUpdateHandler.cxx
diff options
context:
space:
mode:
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");