This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  7fbbd9218d02c7c9aac1cae564319dceb19cc9bb (commit)
       via  b7c97859d7192657ffb777885deefc2856bc2a22 (commit)
       via  33607d7997fbdfbccf6c19352e35b2fe068f4e10 (commit)
       via  094d2ab68151ca31fb3ca652b118e2df72278232 (commit)
       via  a22cfdeaf8fee2b417d03bcfbf539011e738ebfd (commit)
       via  120d424bb2ec1122b9de49a6e17c8040b86db68c (commit)
       via  0873de66e0e5e73fa090626d064d2e7e1d79553e (commit)
       via  aa1076f4600a94494da355d641aa0a5773a67863 (commit)
      from  9c974279539f825f7cf003e51634038c3ef26f9a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7fbbd9218d02c7c9aac1cae564319dceb19cc9bb
commit 7fbbd9218d02c7c9aac1cae564319dceb19cc9bb
Merge: 9c97427 b7c9785
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Sep 3 10:40:05 2012 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Mon Sep 3 10:40:05 2012 -0400

    Merge topic 'ctest-svn-update' into next
    
    b7c9785 cmCTestSVN: Load and process information from externals
    33607d7 cmCTestSVN: Add a LoadExternal() function and an ExternalParser 
class
    094d2ab cmCTestSVN: Use the SVNInfo structure
    a22cfde cmCTestSVN: Create the SVNInfo for the root repository
    120d424 cmCTestSVN: Add the Repositories list and the RootInfo pointer
    0873de6 cmCTestSVN: Extend Revision struct with SVN repo information
    aa1076f cmCTestSVN: Add the new SVNInfo structure


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b7c97859d7192657ffb777885deefc2856bc2a22
commit b7c97859d7192657ffb777885deefc2856bc2a22
Author:     Xavier Besseron <xavier.besse...@uni.lu>
AuthorDate: Mon Sep 3 11:10:53 2012 +0200
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Sep 3 10:38:51 2012 -0400

    cmCTestSVN: Load and process information from externals
    
    Call LoadExternals() and perform operations on all elements of the
    Repositories list.

diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx
index ec1582c..c439281 100644
--- a/Source/CTest/cmCTestSVN.cxx
+++ b/Source/CTest/cmCTestSVN.cxx
@@ -116,9 +116,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";
@@ -126,6 +132,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;
@@ -135,8 +142,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";
@@ -163,6 +174,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;
 }
@@ -374,9 +387,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);
+    }
 }
 
 //----------------------------------------------------------------------------
@@ -413,6 +431,14 @@ void cmCTestSVN::DoRevision(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);
 }
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=33607d7997fbdfbccf6c19352e35b2fe068f4e10
commit 33607d7997fbdfbccf6c19352e35b2fe068f4e10
Author:     Xavier Besseron <xavier.besse...@uni.lu>
AuthorDate: Mon Sep 3 11:03:43 2012 +0200
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Sep 3 10:38:51 2012 -0400

    cmCTestSVN: Add a LoadExternal() function and an ExternalParser class
    
    This call 'svn status' and parse the result to get the list of externals
    repositories.  The external repositories found are added to the
    Repositories list.

diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx
index 69ac152..ec1582c 100644
--- a/Source/CTest/cmCTestSVN.cxx
+++ b/Source/CTest/cmCTestSVN.cxx
@@ -477,6 +477,56 @@ void cmCTestSVN::WriteXMLGlobal(std::ostream& xml)
 }
 
 //----------------------------------------------------------------------------
+class cmCTestSVN::ExternalParser: public cmCTestVC::LineParser
+{
+public:
+  ExternalParser(cmCTestSVN* svn, const char* prefix): SVN(svn)
+    {
+    this->SetLog(&svn->Log, prefix);
+    this->RegexExternal.compile("^X..... +(.+)$");
+    }
+private:
+  cmCTestSVN* SVN;
+  cmsys::RegularExpression RegexExternal;
+  bool ProcessLine()
+    {
+    if(this->RegexExternal.find(this->Line))
+      {
+      this->DoPath(this->RegexExternal.match(1));
+      }
+    return true;
+    }
+
+  void DoPath(std::string const& path)
+    {
+    // Get local path relative to the source directory
+    std::string local_path;
+    if(path.size() > this->SVN->SourceDirectory.size() &&
+       strncmp(path.c_str(), this->SVN->SourceDirectory.c_str(),
+               this->SVN->SourceDirectory.size()) == 0)
+      {
+      local_path = path.c_str() + this->SVN->SourceDirectory.size() + 1;
+      }
+    else
+      {
+      local_path = path;
+      }
+    this->SVN->Repositories.push_back( SVNInfo(local_path.c_str()) );
+    }
+};
+
+//----------------------------------------------------------------------------
+void cmCTestSVN::LoadExternals()
+{
+  // Run "svn status" to get the list of external repositories
+  const char* svn = this->CommandLineTool.c_str();
+  const char* svn_status[] = {svn, "status", 0};
+  ExternalParser out(this, "external-out> ");
+  OutputLogger err(this->Log, "external-err> ");
+  this->RunChild(svn_status, &out, &err);
+}
+
+//----------------------------------------------------------------------------
 std::string cmCTestSVN::SVNInfo::BuildLocalPath(std::string const& path) const
 {
   std::string local_path;
diff --git a/Source/CTest/cmCTestSVN.h b/Source/CTest/cmCTestSVN.h
index 79be9b7..571af8c 100644
--- a/Source/CTest/cmCTestSVN.h
+++ b/Source/CTest/cmCTestSVN.h
@@ -71,6 +71,7 @@ private:
   SVNInfo* RootInfo;
 
   std::string LoadInfo(SVNInfo& svninfo);
+  void LoadExternals();
   void LoadModifications();
   void LoadRevisions();
   void LoadRevisions(SVNInfo& svninfo);
@@ -87,10 +88,12 @@ private:
   class LogParser;
   class StatusParser;
   class UpdateParser;
+  class ExternalParser;
   friend class InfoParser;
   friend class LogParser;
   friend class StatusParser;
   friend class UpdateParser;
+  friend class ExternalParser;
 };
 
 #endif

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=094d2ab68151ca31fb3ca652b118e2df72278232
commit 094d2ab68151ca31fb3ca652b118e2df72278232
Author:     Xavier Besseron <xavier.besse...@uni.lu>
AuthorDate: Mon Sep 3 10:50:07 2012 +0200
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Sep 3 10:38:51 2012 -0400

    cmCTestSVN: Use the SVNInfo structure
    
    - Suppress the URL, Root, Base fields from the cmCTestSVN class
    - Update the code to use RootInfo instead
    - LoadInfo(), GuessBase(), and a new LoadRevision() functions work on a 
given SVNInfo
    - Use the implementation from the base class for LocalPath(), correct path 
is built by SVNInfo::BuildLocalPath() instead

diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx
index a818244..69ac152 100644
--- a/Source/CTest/cmCTestSVN.cxx
+++ b/Source/CTest/cmCTestSVN.cxx
@@ -44,8 +44,11 @@ void cmCTestSVN::CleanupImpl()
 class cmCTestSVN::InfoParser: public cmCTestVC::LineParser
 {
 public:
-  InfoParser(cmCTestSVN* svn, const char* prefix, std::string& rev):
-    SVN(svn), Rev(rev)
+  InfoParser(cmCTestSVN* svn,
+             const char* prefix,
+             std::string& rev,
+             SVNInfo& svninfo):
+      Rev(rev), SVNInfo(svninfo)
     {
     this->SetLog(&svn->Log, prefix);
     this->RegexRev.compile("^Revision: ([0-9]+)");
@@ -53,8 +56,8 @@ public:
     this->RegexRoot.compile("^Repository Root: +([^ ]+) *$");
     }
 private:
-  cmCTestSVN* SVN;
   std::string& Rev;
+  cmCTestSVN::SVNInfo& SVNInfo;
   cmsys::RegularExpression RegexRev;
   cmsys::RegularExpression RegexURL;
   cmsys::RegularExpression RegexRoot;
@@ -66,11 +69,11 @@ private:
       }
     else if(this->RegexURL.find(this->Line))
       {
-      this->SVN->URL = this->RegexURL.match(1);
+      this->SVNInfo.URL = this->RegexURL.match(1);
       }
     else if(this->RegexRoot.find(this->Line))
       {
-      this->SVN->Root = this->RegexRoot.match(1);
+      this->SVNInfo.Root = this->RegexRoot.match(1);
       }
     return true;
     }
@@ -95,13 +98,13 @@ static bool cmCTestSVNPathStarts(std::string const& p1, 
std::string const& p2)
 }
 
 //----------------------------------------------------------------------------
-std::string cmCTestSVN::LoadInfo()
+std::string cmCTestSVN::LoadInfo(SVNInfo& svninfo)
 {
   // Run "svn info" to get the repository info from the work tree.
   const char* svn = this->CommandLineTool.c_str();
-  const char* svn_info[] = {svn, "info", 0};
+  const char* svn_info[] = {svn, "info", svninfo.LocalPath.c_str(), 0};
   std::string rev;
-  InfoParser out(this, "info-out> ", rev);
+  InfoParser out(this, "info-out> ", rev, svninfo);
   OutputLogger err(this->Log, "info-err> ");
   this->RunChild(svn_info, &out, &err);
   return rev;
@@ -113,55 +116,78 @@ void cmCTestSVN::NoteOldRevision()
   // Info for root repository
   this->Repositories.push_back( SVNInfo("") );
   this->RootInfo = &(this->Repositories.back());
-  this->OldRevision = this->LoadInfo();
-  this->Log << "Revision before update: " << this->OldRevision << "\n";
-  cmCTestLog(this->CTest, HANDLER_OUTPUT, "   Old revision of repository is: "
-             << this->OldRevision << "\n");
+
+    // Get info for the root repositiry
+    SVNInfo& svninfo = *RootInfo;
+    svninfo.OldRevision = this->LoadInfo(svninfo);
+    this->Log << "Revision for repository '" << svninfo.LocalPath
+              << "' before update: " << svninfo.OldRevision << "\n";
+    cmCTestLog(this->CTest, HANDLER_OUTPUT,
+               "   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;
   this->PriorRev.Rev = this->OldRevision;
 }
 
 //----------------------------------------------------------------------------
 void cmCTestSVN::NoteNewRevision()
 {
-  this->NewRevision = this->LoadInfo();
-  this->Log << "Revision after update: " << this->NewRevision << "\n";
-  cmCTestLog(this->CTest, HANDLER_OUTPUT, "   New revision of repository is: "
-             << this->NewRevision << "\n");
-
-  // this->Root = ""; // uncomment to test GuessBase
-  this->Log << "URL = " << this->URL << "\n";
-  this->Log << "Root = " << this->Root << "\n";
-
-  // Compute the base path the working tree has checked out under
-  // the repository root.
-  if(!this->Root.empty() && cmCTestSVNPathStarts(this->URL, this->Root))
-    {
-    this->Base = cmCTest::DecodeURL(this->URL.substr(this->Root.size()));
-    this->Base += "/";
-    }
-  this->Log << "Base = " << this->Base << "\n";
+  // Get info for the root repository
+    SVNInfo& svninfo = *RootInfo;
+    svninfo.NewRevision = this->LoadInfo(svninfo);
+    this->Log << "Revision for repository '" << svninfo.LocalPath
+              << "' after update: " << svninfo.NewRevision << "\n";
+    cmCTestLog(this->CTest, HANDLER_OUTPUT,
+               "   New revision of external repository '"
+               << svninfo.LocalPath << "' is: "
+               << svninfo.NewRevision << "\n");
+
+    // svninfo.Root = ""; // uncomment to test GuessBase
+    this->Log << "Repository '" << svninfo.LocalPath
+              << "' URL = " << svninfo.URL << "\n";
+    this->Log << "Repository '" << svninfo.LocalPath
+              << "' Root = " << svninfo.Root << "\n";
+
+    // Compute the base path the working tree has checked out under
+    // the repository root.
+    if(!svninfo.Root.empty()
+       && cmCTestSVNPathStarts(svninfo.URL, svninfo.Root))
+      {
+      svninfo.Base = cmCTest::DecodeURL(
+            svninfo.URL.substr(svninfo.Root.size()));
+      svninfo.Base += "/";
+      }
+    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;
 }
 
 //----------------------------------------------------------------------------
-void cmCTestSVN::GuessBase(std::vector<Change> const& changes)
+void cmCTestSVN::GuessBase(SVNInfo& svninfo,
+                           std::vector<Change> const& changes)
 {
   // Subversion did not give us a good repository root so we need to
   // guess the base path from the URL and the paths in a revision with
   // changes under it.
 
   // Consider each possible URL suffix from longest to shortest.
-  for(std::string::size_type slash = this->URL.find('/');
-      this->Base.empty() && slash != std::string::npos;
-      slash = this->URL.find('/', slash+1))
+  for(std::string::size_type slash = svninfo.URL.find('/');
+      svninfo.Base.empty() && slash != std::string::npos;
+      slash = svninfo.URL.find('/', slash+1))
     {
     // If the URL suffix is a prefix of at least one path then it is the base.
-    std::string base = cmCTest::DecodeURL(this->URL.substr(slash));
+    std::string base = cmCTest::DecodeURL(svninfo.URL.substr(slash));
     for(std::vector<Change>::const_iterator ci = changes.begin();
-        this->Base.empty() && ci != changes.end(); ++ci)
+        svninfo.Base.empty() && ci != changes.end(); ++ci)
       {
       if(cmCTestSVNPathStarts(ci->Path, base))
         {
-        this->Base = base;
+        svninfo.Base = base;
         }
       }
     }
@@ -170,25 +196,9 @@ void cmCTestSVN::GuessBase(std::vector<Change> const& 
changes)
   // base lie under its path.  If no base was found then the working
   // tree must be a checkout of the entire repo and this will match
   // the leading slash in all paths.
-  this->Base += "/";
-
-  this->Log << "Guessed Base = " << this->Base << "\n";
-}
+  svninfo.Base += "/";
 
-//----------------------------------------------------------------------------
-const char* cmCTestSVN::LocalPath(std::string const& path)
-{
-  if(path.size() > this->Base.size() &&
-     strncmp(path.c_str(), this->Base.c_str(), this->Base.size()) == 0)
-    {
-    // This path lies under the base, so return a relative path.
-    return path.c_str() + this->Base.size();
-    }
-  else
-    {
-    // This path does not lie under the base, so ignore it.
-    return 0;
-    }
+  this->Log << "Guessed Base = " << svninfo.Base << "\n";
 }
 
 //----------------------------------------------------------------------------
@@ -277,11 +287,13 @@ class cmCTestSVN::LogParser: public 
cmCTestVC::OutputLogger,
                              private cmXMLParser
 {
 public:
-  LogParser(cmCTestSVN* svn, const char* prefix):
-    OutputLogger(svn->Log, prefix), SVN(svn) { this->InitializeParser(); }
+  LogParser(cmCTestSVN* svn, const char* prefix, SVNInfo& svninfo):
+    OutputLogger(svn->Log, prefix), SVN(svn), SVNInfo(svninfo)
+  { this->InitializeParser(); }
   ~LogParser() { this->CleanupParser(); }
 private:
   cmCTestSVN* SVN;
+  cmCTestSVN::SVNInfo& SVNInfo;
 
   typedef cmCTestSVN::Revision Revision;
   typedef cmCTestSVN::Change Change;
@@ -303,6 +315,7 @@ private:
     if(strcmp(name, "logentry") == 0)
       {
       this->Rev = Revision();
+      this->Rev.SVNInfo = &SVNInfo;
       if(const char* rev = this->FindAttribute(atts, "revision"))
         {
         this->Rev.Rev = rev;
@@ -332,7 +345,9 @@ private:
       }
     else if(strcmp(name, "path") == 0 && !this->CData.empty())
       {
-      this->CurChange.Path.assign(&this->CData[0], this->CData.size());
+      std::string orig_path(&this->CData[0], this->CData.size());
+      std::string new_path = SVNInfo.BuildLocalPath( orig_path );
+      this->CurChange.Path.assign(new_path);
       this->Changes.push_back(this->CurChange);
       }
     else if(strcmp(name, "author") == 0 && !this->CData.empty())
@@ -359,22 +374,31 @@ private:
 //----------------------------------------------------------------------------
 void cmCTestSVN::LoadRevisions()
 {
+    // Get revision of the root repository
+    SVNInfo& svninfo = *RootInfo;
+    LoadRevisions(svninfo);
+}
+
+//----------------------------------------------------------------------------
+void cmCTestSVN::LoadRevisions(SVNInfo &svninfo)
+{
   // We are interested in every revision included in the update.
   std::string revs;
-  if(atoi(this->OldRevision.c_str()) < atoi(this->NewRevision.c_str()))
+  if(atoi(svninfo.OldRevision.c_str()) < atoi(svninfo.NewRevision.c_str()))
     {
-    revs = "-r" + this->OldRevision + ":" + this->NewRevision;
+    revs = "-r" + svninfo.OldRevision + ":" + svninfo.NewRevision;
     }
   else
     {
-    revs = "-r" + this->NewRevision;
+    revs = "-r" + svninfo.NewRevision;
     }
 
   // Run "svn log" to get all global revisions of interest.
   const char* svn = this->CommandLineTool.c_str();
-  const char* svn_log[] = {svn, "log", "--xml", "-v", revs.c_str(), 0};
+  const char* svn_log[] = {svn, "log", "--xml", "-v", revs.c_str(),
+                           svninfo.LocalPath.c_str(), 0};
   {
-  LogParser out(this, "log-out> ");
+  LogParser out(this, "log-out> ", svninfo);
   OutputLogger err(this->Log, "log-err> ");
   this->RunChild(svn_log, &out, &err);
   }
@@ -385,9 +409,9 @@ void cmCTestSVN::DoRevision(Revision const& revision,
                             std::vector<Change> const& changes)
 {
   // Guess the base checkout path from the changes if necessary.
-  if(this->Base.empty() && !changes.empty())
+  if(this->RootInfo->Base.empty() && !changes.empty())
     {
-    this->GuessBase(changes);
+    this->GuessBase(*this->RootInfo, changes);
     }
   this->cmCTestGlobalVC::DoRevision(revision, changes);
 }
@@ -449,7 +473,7 @@ void cmCTestSVN::WriteXMLGlobal(std::ostream& xml)
 {
   this->cmCTestGlobalVC::WriteXMLGlobal(xml);
 
-  xml << "\t<SVNPath>" << this->Base << "</SVNPath>\n";
+  xml << "\t<SVNPath>" << this->RootInfo->Base << "</SVNPath>\n";
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/CTest/cmCTestSVN.h b/Source/CTest/cmCTestSVN.h
index c842a5a..79be9b7 100644
--- a/Source/CTest/cmCTestSVN.h
+++ b/Source/CTest/cmCTestSVN.h
@@ -33,15 +33,6 @@ private:
   virtual void NoteNewRevision();
   virtual bool UpdateImpl();
 
-  // URL of repository directory checked out in the working tree.
-  std::string URL;
-
-  // URL of repository root directory.
-  std::string Root;
-
-  // Directory under repository root checked out in working tree.
-  std::string Base;
-
   // Information about an SVN repository (root repository or external)
   struct SVNInfo {
 
@@ -79,12 +70,12 @@ private:
   // Pointer to the infos of the root repository.
   SVNInfo* RootInfo;
 
-  std::string LoadInfo();
+  std::string LoadInfo(SVNInfo& svninfo);
   void LoadModifications();
   void LoadRevisions();
+  void LoadRevisions(SVNInfo& svninfo);
 
-  void GuessBase(std::vector<Change> const& changes);
-  const char* LocalPath(std::string const& path);
+  void GuessBase(SVNInfo &svninfo, std::vector<Change> const& changes);
 
   void DoRevision(Revision const& revision,
                   std::vector<Change> const& changes);

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a22cfdeaf8fee2b417d03bcfbf539011e738ebfd
commit a22cfdeaf8fee2b417d03bcfbf539011e738ebfd
Author:     Xavier Besseron <xavier.besse...@uni.lu>
AuthorDate: Fri Aug 24 10:48:57 2012 +0200
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Sep 3 10:38:51 2012 -0400

    cmCTestSVN: Create the SVNInfo for the root repository

diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx
index 7ca87e2..a818244 100644
--- a/Source/CTest/cmCTestSVN.cxx
+++ b/Source/CTest/cmCTestSVN.cxx
@@ -110,6 +110,9 @@ std::string cmCTestSVN::LoadInfo()
 //----------------------------------------------------------------------------
 void cmCTestSVN::NoteOldRevision()
 {
+  // Info for root repository
+  this->Repositories.push_back( SVNInfo("") );
+  this->RootInfo = &(this->Repositories.back());
   this->OldRevision = this->LoadInfo();
   this->Log << "Revision before update: " << this->OldRevision << "\n";
   cmCTestLog(this->CTest, HANDLER_OUTPUT, "   Old revision of repository is: "

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=120d424bb2ec1122b9de49a6e17c8040b86db68c
commit 120d424bb2ec1122b9de49a6e17c8040b86db68c
Author:     Xavier Besseron <xavier.besse...@uni.lu>
AuthorDate: Fri Aug 24 10:47:59 2012 +0200
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Sep 3 10:38:51 2012 -0400

    cmCTestSVN: Add the Repositories list and the RootInfo pointer
    
    The Repository list will contain the SVNInfo of all the repositoryies
    (root and external ones).  The RootInfo pointer will point to the
    SVNInfo structure of the root repository.

diff --git a/Source/CTest/cmCTestSVN.h b/Source/CTest/cmCTestSVN.h
index afa2695..c842a5a 100644
--- a/Source/CTest/cmCTestSVN.h
+++ b/Source/CTest/cmCTestSVN.h
@@ -73,6 +73,12 @@ private:
     cmCTestSVN::SVNInfo* SVNInfo;
   };
 
+  // Info of all the repositories (root, externals and nested ones).
+  std::list<SVNInfo> Repositories;
+
+  // Pointer to the infos of the root repository.
+  SVNInfo* RootInfo;
+
   std::string LoadInfo();
   void LoadModifications();
   void LoadRevisions();

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0873de66e0e5e73fa090626d064d2e7e1d79553e
commit 0873de66e0e5e73fa090626d064d2e7e1d79553e
Author:     Xavier Besseron <xavier.besse...@uni.lu>
AuthorDate: Fri Aug 24 10:30:09 2012 +0200
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Sep 3 10:38:51 2012 -0400

    cmCTestSVN: Extend Revision struct with SVN repo information

diff --git a/Source/CTest/cmCTestSVN.h b/Source/CTest/cmCTestSVN.h
index 97eeaf5..afa2695 100644
--- a/Source/CTest/cmCTestSVN.h
+++ b/Source/CTest/cmCTestSVN.h
@@ -67,6 +67,12 @@ private:
 
   };
 
+  // Extended revision structure to include info about external it refers to.
+  struct Revision : public cmCTestVC::Revision
+  {
+    cmCTestSVN::SVNInfo* SVNInfo;
+  };
+
   std::string LoadInfo();
   void LoadModifications();
   void LoadRevisions();

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aa1076f4600a94494da355d641aa0a5773a67863
commit aa1076f4600a94494da355d641aa0a5773a67863
Author:     Xavier Besseron <xavier.besse...@uni.lu>
AuthorDate: Mon Sep 3 10:45:05 2012 +0200
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Sep 3 10:38:51 2012 -0400

    cmCTestSVN: Add the new SVNInfo structure
    
    It represents information of an SVN repository. It can be the base
    repository or an external one.

diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx
index fab9a8c..7ca87e2 100644
--- a/Source/CTest/cmCTestSVN.cxx
+++ b/Source/CTest/cmCTestSVN.cxx
@@ -448,3 +448,29 @@ void cmCTestSVN::WriteXMLGlobal(std::ostream& xml)
 
   xml << "\t<SVNPath>" << this->Base << "</SVNPath>\n";
 }
+
+//----------------------------------------------------------------------------
+std::string cmCTestSVN::SVNInfo::BuildLocalPath(std::string const& path) const
+{
+  std::string local_path;
+
+  // Add local path prefix if not empty
+  if (!this->LocalPath.empty())
+    {
+    local_path += this->LocalPath;
+    local_path += "/";
+    }
+
+  // Add path with base prefix removed
+  if(path.size() > this->Base.size() &&
+     strncmp(path.c_str(), this->Base.c_str(), this->Base.size()) == 0)
+    {
+    local_path += (path.c_str() + this->Base.size());
+    }
+  else
+    {
+    local_path += path;
+  }
+
+  return local_path;
+}
diff --git a/Source/CTest/cmCTestSVN.h b/Source/CTest/cmCTestSVN.h
index f72c58f..97eeaf5 100644
--- a/Source/CTest/cmCTestSVN.h
+++ b/Source/CTest/cmCTestSVN.h
@@ -42,6 +42,31 @@ private:
   // Directory under repository root checked out in working tree.
   std::string Base;
 
+  // Information about an SVN repository (root repository or external)
+  struct SVNInfo {
+
+    SVNInfo(const char* path) : LocalPath(path) {}
+    // Remove base from the filename
+    std::string BuildLocalPath(std::string const& path) const;
+
+    // LocalPath relative to the main source directory.
+    std::string LocalPath;
+
+    // URL of repository directory checked out in the working tree.
+    std::string URL;
+
+    // URL of repository root directory.
+    std::string Root;
+
+    // Directory under repository root checked out in working tree.
+    std::string Base;
+
+    // Old and new repository revisions.
+    std::string OldRevision;
+    std::string NewRevision;
+
+  };
+
   std::string LoadInfo();
   void LoadModifications();
   void LoadRevisions();

-----------------------------------------------------------------------

Summary of changes:
 Source/CTest/cmCTestSVN.cxx |  255 ++++++++++++++++++++++++++++++++-----------
 Source/CTest/cmCTestSVN.h   |   49 +++++++--
 2 files changed, 232 insertions(+), 72 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits

Reply via email to