summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestUpdateHandler.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-05-14 20:13:52 (GMT)
committerBrad King <brad.king@kitware.com>2009-05-14 20:13:52 (GMT)
commita524e07152728d652a29761b43b334b7aed390d6 (patch)
treedeb1fd0082f7cad680d7686e30c21ec76a655ae5 /Source/CTest/cmCTestUpdateHandler.cxx
parentca3e9623e94f270e784dc621b1a38f455183882f (diff)
downloadCMake-a524e07152728d652a29761b43b334b7aed390d6.zip
CMake-a524e07152728d652a29761b43b334b7aed390d6.tar.gz
CMake-a524e07152728d652a29761b43b334b7aed390d6.tar.bz2
ENH: Teach CTest to handle Bazaar repositories
This creates cmCTestBZR to drive CTest Update handling on bzr-based work trees. Currently we always update to the head of the remote tracking branch (bzr pull), so the nightly start time is ignored for Nightly builds. A later change will address this. Patch from Tom Vercauteren. See issue #6857.
Diffstat (limited to 'Source/CTest/cmCTestUpdateHandler.cxx')
-rw-r--r--Source/CTest/cmCTestUpdateHandler.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx
index edd0ac4..d3930d7 100644
--- a/Source/CTest/cmCTestUpdateHandler.cxx
+++ b/Source/CTest/cmCTestUpdateHandler.cxx
@@ -30,6 +30,7 @@
#include "cmCTestVC.h"
#include "cmCTestCVS.h"
#include "cmCTestSVN.h"
+#include "cmCTestBZR.h"
#include "cmCTestGIT.h"
#include <cmsys/auto_ptr.hxx>
@@ -52,6 +53,7 @@ static const char* cmCTestUpdateHandlerUpdateStrings[] =
"Unknown",
"CVS",
"SVN",
+ "BZR",
"GIT"
};
@@ -135,6 +137,10 @@ int cmCTestUpdateHandler::DetermineType(const char* cmd, const char* type)
{
return cmCTestUpdateHandler::e_SVN;
}
+ if ( stype.find("bzr") != std::string::npos )
+ {
+ return cmCTestUpdateHandler::e_BZR;
+ }
if ( stype.find("git") != std::string::npos )
{
return cmCTestUpdateHandler::e_GIT;
@@ -153,6 +159,10 @@ int cmCTestUpdateHandler::DetermineType(const char* cmd, const char* type)
{
return cmCTestUpdateHandler::e_SVN;
}
+ if ( stype.find("bzr") != std::string::npos )
+ {
+ return cmCTestUpdateHandler::e_BZR;
+ }
if ( stype.find("git") != std::string::npos )
{
return cmCTestUpdateHandler::e_GIT;
@@ -214,6 +224,7 @@ int cmCTestUpdateHandler::ProcessHandler()
{
case e_CVS: vc.reset(new cmCTestCVS(this->CTest, ofs)); break;
case e_SVN: vc.reset(new cmCTestSVN(this->CTest, ofs)); break;
+ case e_BZR: vc.reset(new cmCTestBZR(this->CTest, ofs)); break;
case e_GIT: vc.reset(new cmCTestGIT(this->CTest, ofs)); break;
default: vc.reset(new cmCTestVC(this->CTest, ofs)); break;
}
@@ -349,6 +360,12 @@ int cmCTestUpdateHandler::DetectVCS(const char* dir)
return cmCTestUpdateHandler::e_CVS;
}
sourceDirectory = dir;
+ sourceDirectory += "/.bzr";
+ if ( cmSystemTools::FileExists(sourceDirectory.c_str()) )
+ {
+ return cmCTestUpdateHandler::e_BZR;
+ }
+ sourceDirectory = dir;
sourceDirectory += "/.git";
if ( cmSystemTools::FileExists(sourceDirectory.c_str()) )
{
@@ -381,6 +398,7 @@ bool cmCTestUpdateHandler::SelectVCS()
{
case e_CVS: key = "CVSCommand"; break;
case e_SVN: key = "SVNCommand"; break;
+ case e_BZR: key = "BZRCommand"; break;
case e_GIT: key = "GITCommand"; break;
default: break;
}