[Cmake-commits] [cmake-commits] hoffman committed cmCTestUpdateHandler.cxx 1.44 1.45

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Oct 10 09:36:18 EDT 2008


Update of /cvsroot/CMake/CMake/Source/CTest
In directory public:/mounts/ram/cvs-serv2125

Modified Files:
	cmCTestUpdateHandler.cxx 
Log Message:
ENH: play it safe and restore the value of LC_MESSAGES


Index: cmCTestUpdateHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestUpdateHandler.cxx,v
retrieving revision 1.44
retrieving revision 1.45
diff -C 2 -d -r1.44 -r1.45
*** cmCTestUpdateHandler.cxx	10 Oct 2008 13:23:49 -0000	1.44
--- cmCTestUpdateHandler.cxx	10 Oct 2008 13:36:16 -0000	1.45
***************
*** 254,258 ****
--- 254,263 ----
  
    // make sure 
+   std::string saveLCMessages;
    const char* lcmess = cmSystemTools::GetEnv("LC_MESSAGES");
+   if(lcmess)
+     {
+     saveLCMessages = lcmess;
+     }
    // if LC_MESSAGES is not set to en_EN, then 
    // set it, so that svn/cvs info will be in english
***************
*** 1111,1115 ****
    os << "</UpdateReturnStatus>" << std::endl;
    os << "</Update>" << std::endl;
! 
    if (! res  )
      {
--- 1116,1131 ----
    os << "</UpdateReturnStatus>" << std::endl;
    os << "</Update>" << std::endl;
!   // restore the value of LC_MESSAGES after running the version control
!   // commands
!   if(saveLCMessages.size())
!     {
!     std::string put = "LC_MESSAGES=";
!     put += saveLCMessages;
!     cmSystemTools::PutEnv(put.c_str());
!     }
!   else
!     {
!     cmSystemTools::UnsetEnv("LC_MESSAGES");
!     }
    if (! res  )
      {



More information about the Cmake-commits mailing list