[Cmake-commits] CMake branch, next, updated. v3.2.2-3240-g1951bec

Brad King brad.king at kitware.com
Thu May 28 11:07:49 EDT 2015


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  1951bec46f981e3beed0b18e387088d0c82a5fd0 (commit)
       via  5625271616535213d22410b64f0b944afeb28d2a (commit)
       via  7e10f1691f61949430180882e3a2484d0859b9e2 (commit)
       via  0d37dcd33534be17ac0ae13cb59b18743dbdb4f1 (commit)
       via  43c01e07504e2ab61e7a30b428c1c9601791f948 (commit)
      from  c164bc554eb625417c71beb67d69db000a13e234 (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=1951bec46f981e3beed0b18e387088d0c82a5fd0
commit 1951bec46f981e3beed0b18e387088d0c82a5fd0
Merge: c164bc5 5625271
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 28 11:07:47 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu May 28 11:07:47 2015 -0400

    Merge topic 'file-log-less-data' into next
    
    56252716 cmFileCommand: Do not log raw protocol data from curl (#15589)
    7e10f169 cmFileCommand: Clarify logic for populating LOG variable
    0d37dcd3 cmFileCommand: Rename variable verboseLog => logVar
    43c01e07 cmFileCommand: Remove leftover no-op debugging logic


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5625271616535213d22410b64f0b944afeb28d2a
commit 5625271616535213d22410b64f0b944afeb28d2a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 28 10:54:39 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu May 28 10:59:57 2015 -0400

    cmFileCommand: Do not log raw protocol data from curl (#15589)
    
    Teach cmFileCommandCurlDebugCallback to filter the debug data by type
    and show only summary information instead of the raw data.  This avoids
    allocating memory for all data transferred by UPLOAD or DOWNLOAD.

diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 2c2c1c0..ac69e3d 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2798,13 +2798,35 @@ namespace {
 
 
   static size_t
-  cmFileCommandCurlDebugCallback(CURL *, curl_infotype, char *chPtr,
+  cmFileCommandCurlDebugCallback(CURL *, curl_infotype type, char *chPtr,
                                  size_t size, void *data)
     {
     cmFileCommandVectorOfChar *vec
       = static_cast<cmFileCommandVectorOfChar*>(data);
-    vec->insert(vec->end(), chPtr, chPtr + size);
-    return size;
+    switch(type)
+      {
+      case CURLINFO_TEXT:
+      case CURLINFO_HEADER_IN:
+      case CURLINFO_HEADER_OUT:
+        vec->insert(vec->end(), chPtr, chPtr + size);
+        break;
+      case CURLINFO_DATA_IN:
+      case CURLINFO_DATA_OUT:
+      case CURLINFO_SSL_DATA_IN:
+      case CURLINFO_SSL_DATA_OUT:
+        {
+        char buf[128];
+        int n = sprintf(buf, "[%" cmIML_INT_PRIu64 " bytes data]\n", size);
+        if (n > 0)
+          {
+          vec->insert(vec->end(), buf, buf + n);
+          }
+        }
+        break;
+      default:
+        break;
+      }
+    return 0;
     }
 
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7e10f1691f61949430180882e3a2484d0859b9e2
commit 7e10f1691f61949430180882e3a2484d0859b9e2
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 28 10:35:08 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu May 28 10:37:28 2015 -0400

    cmFileCommand: Clarify logic for populating LOG variable
    
    The chunkDebug buffer we use to accumulate the LOG variable content
    is populated if and only if a log variable was requested by the call,
    but it is much clearer to check that a log variable was requested
    explicitly before populating it.

diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 984989e..2c2c1c0 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -3287,7 +3287,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
       }
     }
 
-  if(!chunkDebug.empty())
+  if (!logVar.empty())
     {
     chunkDebug.push_back(0);
     this->Makefile->AddDefinition(logVar, &*chunkDebug.begin());

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0d37dcd33534be17ac0ae13cb59b18743dbdb4f1
commit 0d37dcd33534be17ac0ae13cb59b18743dbdb4f1
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 28 10:33:44 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu May 28 10:33:44 2015 -0400

    cmFileCommand: Rename variable verboseLog => logVar
    
    This makes the LOG variable name consistent between UPLOAD and DOWNLOAD
    implementations.

diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index f0d0286..984989e 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2963,7 +2963,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
 
   long timeout = 0;
   long inactivity_timeout = 0;
-  std::string verboseLog;
+  std::string logVar;
   std::string statusVar;
   bool tls_verify = this->Makefile->IsOn("CMAKE_TLS_VERIFY");
   const char* cainfo = this->Makefile->GetDefinition("CMAKE_TLS_CAINFO");
@@ -3008,7 +3008,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
         this->SetError("DOWNLOAD missing VAR for LOG.");
         return false;
         }
-      verboseLog = *i;
+      logVar = *i;
       }
     else if(*i == "STATUS")
       {
@@ -3200,7 +3200,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
   res = ::curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
   check_curl_result(res, "DOWNLOAD cannot set follow-redirect option: ");
 
-  if(!verboseLog.empty())
+  if(!logVar.empty())
     {
     res = ::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
     check_curl_result(res, "DOWNLOAD cannot set verbose: ");
@@ -3290,8 +3290,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
   if(!chunkDebug.empty())
     {
     chunkDebug.push_back(0);
-    this->Makefile->AddDefinition(verboseLog,
-                                  &*chunkDebug.begin());
+    this->Makefile->AddDefinition(logVar, &*chunkDebug.begin());
     }
 
   return true;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=43c01e07504e2ab61e7a30b428c1c9601791f948
commit 43c01e07504e2ab61e7a30b428c1c9601791f948
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 28 10:15:00 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu May 28 10:16:37 2015 -0400

    cmFileCommand: Remove leftover no-op debugging logic
    
    Remove debugging logic left from commit v2.6.0~305 (add DOWNLOAD option
    to FILE command, 2008-02-06).  The CURLE_OPERATION_TIMEOUTED code path
    does nothing that the code immediately after it does not do.

diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 0af4688..f0d0286 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -3290,17 +3290,6 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
   if(!chunkDebug.empty())
     {
     chunkDebug.push_back(0);
-    if(CURLE_OPERATION_TIMEOUTED == res)
-      {
-      std::string output = &*chunkDebug.begin();
-
-      if(!verboseLog.empty())
-        {
-        this->Makefile->AddDefinition(verboseLog,
-                                      &*chunkDebug.begin());
-        }
-      }
-
     this->Makefile->AddDefinition(verboseLog,
                                   &*chunkDebug.begin());
     }

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

Summary of changes:
 Source/cmFileCommand.cxx |   50 +++++++++++++++++++++++++++-------------------
 1 file changed, 30 insertions(+), 20 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list