summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestSVN.cxx
diff options
context:
space:
mode:
authorXavier Besseron <xavier.besseron@uni.lu>2012-09-03 09:10:53 (GMT)
committerBrad King <brad.king@kitware.com>2012-09-04 12:35:36 (GMT)
commit57234dd10a091e676d9e3a9279029dadace757c3 (patch)
tree9416cff1a03a2c7abf982689eb8ecc49926891eb /Source/CTest/cmCTestSVN.cxx
parent3776690e62c631edd520f566b2ebcaffbad230b4 (diff)
downloadCMake-57234dd10a091e676d9e3a9279029dadace757c3.zip
CMake-57234dd10a091e676d9e3a9279029dadace757c3.tar.gz
CMake-57234dd10a091e676d9e3a9279029dadace757c3.tar.bz2
cmCTestSVN: Load and process information from externals
Call LoadExternals() and perform operations on all elements of the Repositories list.
Diffstat (limited to 'Source/CTest/cmCTestSVN.cxx')
-rw-r--r--Source/CTest/cmCTestSVN.cxx38
1 files changed, 32 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx
index b27c633..49cea2e 100644
--- a/Source/CTest/cmCTestSVN.cxx
+++ b/Source/CTest/cmCTestSVN.cxx
@@ -121,9 +121,15 @@ void cmCTestSVN::NoteOldRevision()
// Info for root repository
this->Repositories.push_back( SVNInfo("") );
this->RootInfo = &(this->Repositories.back());
+ // Info for the external repositories
+ this->LoadExternals();
- // Get info for the root repositiry
- SVNInfo& svninfo = *RootInfo;
+ // Get info for all the repositories
+ std::list<SVNInfo>::iterator itbeg = this->Repositories.begin();
+ std::list<SVNInfo>::iterator itend = this->Repositories.end();
+ for( ; itbeg != itend ; itbeg++)
+ {
+ SVNInfo& svninfo = *itbeg;
svninfo.OldRevision = this->LoadInfo(svninfo);
this->Log << "Revision for repository '" << svninfo.LocalPath
<< "' before update: " << svninfo.OldRevision << "\n";
@@ -131,6 +137,7 @@ void cmCTestSVN::NoteOldRevision()
" Old revision of external repository '"
<< svninfo.LocalPath << "' is: "
<< svninfo.OldRevision << "\n");
+ }
// Set the global old revision to the one of the root
this->OldRevision = this->RootInfo->OldRevision;
@@ -140,8 +147,12 @@ void cmCTestSVN::NoteOldRevision()
//----------------------------------------------------------------------------
void cmCTestSVN::NoteNewRevision()
{
- // Get info for the root repository
- SVNInfo& svninfo = *RootInfo;
+ // Get info for the external repositories
+ std::list<SVNInfo>::iterator itbeg = this->Repositories.begin();
+ std::list<SVNInfo>::iterator itend = this->Repositories.end();
+ for( ; itbeg != itend ; itbeg++)
+ {
+ SVNInfo& svninfo = *itbeg;
svninfo.NewRevision = this->LoadInfo(svninfo);
this->Log << "Revision for repository '" << svninfo.LocalPath
<< "' after update: " << svninfo.NewRevision << "\n";
@@ -168,6 +179,8 @@ void cmCTestSVN::NoteNewRevision()
this->Log << "Repository '" << svninfo.LocalPath
<< "' Base = " << svninfo.Base << "\n";
+ }
+
// Set the global new revision to the one of the root
this->NewRevision = this->RootInfo->NewRevision;
}
@@ -379,9 +392,14 @@ private:
//----------------------------------------------------------------------------
void cmCTestSVN::LoadRevisions()
{
- // Get revision of the root repository
- SVNInfo& svninfo = *RootInfo;
+ // Get revisions for all the external repositories
+ std::list<SVNInfo>::iterator itbeg = this->Repositories.begin();
+ std::list<SVNInfo>::iterator itend = this->Repositories.end();
+ for( ; itbeg != itend ; itbeg++)
+ {
+ SVNInfo& svninfo = *itbeg;
LoadRevisions(svninfo);
+ }
}
//----------------------------------------------------------------------------
@@ -418,6 +436,14 @@ void cmCTestSVN::DoRevisionSVN(Revision const& revision,
{
this->GuessBase(*this->RootInfo, changes);
}
+
+ // Ignore changes in the old revision for external repositories
+ if(revision.Rev == revision.SVNInfo->OldRevision
+ && revision.SVNInfo->LocalPath != "")
+ {
+ return;
+ }
+
this->cmCTestGlobalVC::DoRevision(revision, changes);
}