cmCTestSVN: Load and process information from externals

Call LoadExternals() and perform operations on all elements of the
Repositories list.
This commit is contained in:
Xavier Besseron 2012-09-03 11:10:53 +02:00 committed by Brad King
parent 3776690e62
commit 57234dd10a
1 changed files with 32 additions and 6 deletions

View File

@ -121,9 +121,15 @@ void cmCTestSVN::NoteOldRevision()
// Info for root repository // Info for root repository
this->Repositories.push_back( SVNInfo("") ); this->Repositories.push_back( SVNInfo("") );
this->RootInfo = &(this->Repositories.back()); this->RootInfo = &(this->Repositories.back());
// Info for the external repositories
this->LoadExternals();
// Get info for the root repositiry // Get info for all the repositories
SVNInfo& svninfo = *RootInfo; 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); svninfo.OldRevision = this->LoadInfo(svninfo);
this->Log << "Revision for repository '" << svninfo.LocalPath this->Log << "Revision for repository '" << svninfo.LocalPath
<< "' before update: " << svninfo.OldRevision << "\n"; << "' before update: " << svninfo.OldRevision << "\n";
@ -131,6 +137,7 @@ void cmCTestSVN::NoteOldRevision()
" Old revision of external repository '" " Old revision of external repository '"
<< svninfo.LocalPath << "' is: " << svninfo.LocalPath << "' is: "
<< svninfo.OldRevision << "\n"); << svninfo.OldRevision << "\n");
}
// Set the global old revision to the one of the root // Set the global old revision to the one of the root
this->OldRevision = this->RootInfo->OldRevision; this->OldRevision = this->RootInfo->OldRevision;
@ -140,8 +147,12 @@ void cmCTestSVN::NoteOldRevision()
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmCTestSVN::NoteNewRevision() void cmCTestSVN::NoteNewRevision()
{ {
// Get info for the root repository // Get info for the external repositories
SVNInfo& svninfo = *RootInfo; 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); svninfo.NewRevision = this->LoadInfo(svninfo);
this->Log << "Revision for repository '" << svninfo.LocalPath this->Log << "Revision for repository '" << svninfo.LocalPath
<< "' after update: " << svninfo.NewRevision << "\n"; << "' after update: " << svninfo.NewRevision << "\n";
@ -168,6 +179,8 @@ void cmCTestSVN::NoteNewRevision()
this->Log << "Repository '" << svninfo.LocalPath this->Log << "Repository '" << svninfo.LocalPath
<< "' Base = " << svninfo.Base << "\n"; << "' Base = " << svninfo.Base << "\n";
}
// Set the global new revision to the one of the root // Set the global new revision to the one of the root
this->NewRevision = this->RootInfo->NewRevision; this->NewRevision = this->RootInfo->NewRevision;
} }
@ -379,9 +392,14 @@ private:
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmCTestSVN::LoadRevisions() void cmCTestSVN::LoadRevisions()
{ {
// Get revision of the root repository // Get revisions for all the external repositories
SVNInfo& svninfo = *RootInfo; 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); LoadRevisions(svninfo);
}
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -418,6 +436,14 @@ void cmCTestSVN::DoRevisionSVN(Revision const& revision,
{ {
this->GuessBase(*this->RootInfo, changes); 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); this->cmCTestGlobalVC::DoRevision(revision, changes);
} }