[Cmake-commits] CMake branch, next, updated. v2.8.3-1035-gf7d29ee

Zach Mullen zach.mullen at kitware.com
Mon Dec 20 16:06:04 EST 2010


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  f7d29ee913d168749ae3f424ce32794182866e12 (commit)
       via  307b8a6e6995b2c08fb71d7eea202e2ab0a8a204 (commit)
      from  7b74942a96ada709ace7b4b4a0cf7c6e50bd08b8 (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=f7d29ee913d168749ae3f424ce32794182866e12
commit f7d29ee913d168749ae3f424ce32794182866e12
Merge: 7b74942 307b8a6
Author:     Zach Mullen <zach.mullen at kitware.com>
AuthorDate: Mon Dec 20 16:05:51 2010 -0500
Commit:     Zach Mullen <zach.mullen at kitware.com>
CommitDate: Mon Dec 20 16:05:51 2010 -0500

    Merge branch 'ctest-git-send-committer' into next


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=307b8a6e6995b2c08fb71d7eea202e2ab0a8a204
commit 307b8a6e6995b2c08fb71d7eea202e2ab0a8a204
Author:     Zach Mullen <zach.mullen at kitware.com>
AuthorDate: Mon Dec 20 15:33:21 2010 -0500
Commit:     Zach Mullen <zach.mullen at kitware.com>
CommitDate: Mon Dec 20 16:05:40 2010 -0500

    CTest git update should pass the committer as well as the author

diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx
index a6f10ec..3456ec4 100644
--- a/Source/CTest/cmCTestGIT.cxx
+++ b/Source/CTest/cmCTestGIT.cxx
@@ -526,6 +526,35 @@ private:
         }
       this->Rev.Date += tz;
       }
+    else if(strncmp(this->Line.c_str(), "committer ", 10) == 0)
+      {
+      Person committer;
+      this->ParsePerson(this->Line.c_str()+10, committer);
+      this->Rev.Committer = committer.Name;
+      this->Rev.CommitterEMail = committer.EMail;
+
+      // Convert the time to a human-readable format that is also easy
+      // to machine-parse: "CCYY-MM-DD hh:mm:ss".
+      time_t seconds = static_cast<time_t>(committer.Time);
+      struct tm* t = gmtime(&seconds);
+      char dt[1024];
+      sprintf(dt, "%04d-%02d-%02d %02d:%02d:%02d",
+              t->tm_year+1900, t->tm_mon+1, t->tm_mday,
+              t->tm_hour, t->tm_min, t->tm_sec);
+      this->Rev.CommitDate = dt;
+
+      // Add the time-zone field "+zone" or "-zone".
+      char tz[32];
+      if(committer.TimeZone >= 0)
+        {
+        sprintf(tz, " +%04ld", committer.TimeZone);
+        }
+      else
+        {
+        sprintf(tz, " -%04ld", -committer.TimeZone);
+        }
+      this->Rev.CommitDate += tz;
+      }
     }
 
   void DoBodyLine()
diff --git a/Source/CTest/cmCTestVC.cxx b/Source/CTest/cmCTestVC.cxx
index f9ad79a..fbee227 100644
--- a/Source/CTest/cmCTestVC.cxx
+++ b/Source/CTest/cmCTestVC.cxx
@@ -228,6 +228,11 @@ void cmCTestVC::WriteXMLEntry(std::ostream& xml,
       << "\t\t\t<CheckinDate>" << cmXMLSafe(rev.Date) << "</CheckinDate>\n"
       << "\t\t\t<Author>" << cmXMLSafe(rev.Author) << "</Author>\n"
       << "\t\t\t<Email>" << cmXMLSafe(rev.EMail) << "</Email>\n"
+      << "\t\t\t<Committer>" << cmXMLSafe(rev.Committer) << "</Committer>\n"
+      << "\t\t\t<CommitterEmail>" << cmXMLSafe(rev.CommitterEMail)
+      << "</CommitterEmail>\n"
+      << "\t\t\t<CommitDate>" << cmXMLSafe(rev.CommitDate)
+      << "</CommitDate>\n"
       << "\t\t\t<Log>" << cmXMLSafe(rev.Log) << "</Log>\n"
       << "\t\t\t<Revision>" << cmXMLSafe(rev.Rev) << "</Revision>\n"
       << "\t\t\t<PriorRevision>" << cmXMLSafe(prior) << "</PriorRevision>\n"
diff --git a/Source/CTest/cmCTestVC.h b/Source/CTest/cmCTestVC.h
index d36bc8f..44e1dac 100644
--- a/Source/CTest/cmCTestVC.h
+++ b/Source/CTest/cmCTestVC.h
@@ -74,6 +74,9 @@ protected:
     std::string Date;
     std::string Author;
     std::string EMail;
+    std::string Committer;
+    std::string CommitterEMail;
+    std::string CommitDate;
     std::string Log;
   };
 

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

Summary of changes:
 Source/CTest/cmCTestGIT.cxx |   29 +++++++++++++++++++++++++++++
 Source/CTest/cmCTestVC.cxx  |    5 +++++
 Source/CTest/cmCTestVC.h    |    3 +++
 3 files changed, 37 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list