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 b353ae91e5b48f1eb5f64185b20491ac7f792018 (commit) via f552c3c9f1aa3fc16d174df2f5b054fb05b341f8 (commit) from 013f8f78b0bdaa12a37800b4eca410330e406d1c (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=b353ae91e5b48f1eb5f64185b20491ac7f792018 commit b353ae91e5b48f1eb5f64185b20491ac7f792018 Merge: 013f8f7 f552c3c Author: Zach Mullen <zach.mul...@kitware.com> AuthorDate: Mon Feb 28 15:26:38 2011 -0500 Commit: Zach Mullen <zach.mul...@kitware.com> CommitDate: Mon Feb 28 15:26:38 2011 -0500 Merge branch 'upload-built-files' into next http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f552c3c9f1aa3fc16d174df2f5b054fb05b341f8 commit f552c3c9f1aa3fc16d174df2f5b054fb05b341f8 Author: Zach Mullen <zach.mul...@kitware.com> AuthorDate: Mon Feb 28 15:26:24 2011 -0500 Commit: Zach Mullen <zach.mul...@kitware.com> CommitDate: Mon Feb 28 15:26:24 2011 -0500 Don't tar/gz ctest_upload() files diff --git a/Source/CTest/cmCTestUploadHandler.cxx b/Source/CTest/cmCTestUploadHandler.cxx index 4d1cf42..caf2e53 100644 --- a/Source/CTest/cmCTestUploadHandler.cxx +++ b/Source/CTest/cmCTestUploadHandler.cxx @@ -66,8 +66,8 @@ int cmCTestUploadHandler::ProcessHandler() cmCTestLog(this->CTest, OUTPUT, "\tUpload file: " << it->c_str() << std::endl); ofs << "<File filename=\"" << cmXMLSafe(*it) << "\">\n" - << "<Content compression=\"tar/gzip\" encoding=\"base64\">\n"; - ofs << this->CTest->Base64GzipEncodeFile(*it); + << "<Content encoding=\"base64\">\n"; + ofs << this->CTest->Base64EncodeFile(*it); ofs << "\n</Content>\n" << "</File>\n"; } diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 5827167..70b1c01 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1600,8 +1600,16 @@ std::string cmCTest::Base64GzipEncodeFile(std::string file) "encoding file: " << file << std::endl); return ""; } - long len = cmSystemTools::FileLength(tarFile.c_str()); - std::ifstream ifs(tarFile.c_str(), std::ios::in + std::string base64 = this->Base64EncodeFile(tarFile); + cmSystemTools::RemoveFile(tarFile.c_str()); + return base64; +} + +//---------------------------------------------------------------------- +std::string cmCTest::Base64EncodeFile(std::string file) +{ + long len = cmSystemTools::FileLength(file.c_str()); + std::ifstream ifs(file.c_str(), std::ios::in #ifdef _WIN32 | std::ios::binary #endif @@ -1609,7 +1617,6 @@ std::string cmCTest::Base64GzipEncodeFile(std::string file) unsigned char *file_buffer = new unsigned char [ len + 1 ]; ifs.read(reinterpret_cast<char*>(file_buffer), len); ifs.close(); - cmSystemTools::RemoveFile(tarFile.c_str()); unsigned char *encoded_buffer = new unsigned char [ static_cast<int>( @@ -1629,6 +1636,7 @@ std::string cmCTest::Base64GzipEncodeFile(std::string file) return base64; } + //---------------------------------------------------------------------- bool cmCTest::SubmitExtraFiles(const std::vector<cmStdString> &files) { diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 4bd628f..3b02748 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -195,6 +195,8 @@ public: //! tar/gzip and then base 64 encode a file std::string Base64GzipEncodeFile(std::string file); + //! base64 encode a file + std::string Base64EncodeFile(std::string file); /** * Return the time remaining that the script is allowed to run in ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestUploadHandler.cxx | 4 ++-- Source/cmCTest.cxx | 14 +++++++++++--- Source/cmCTest.h | 2 ++ 3 files changed, 15 insertions(+), 5 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits