summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-10-10 13:36:16 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-10-10 13:36:16 (GMT)
commit74e606a270c5a05f93afa584979f65f15005ac33 (patch)
tree1d4df6543e6454728275760265941d880c4b6811 /Source/CTest
parentd306ab66b1ebb48fb8321554ac0e84970c500d4f (diff)
downloadCMake-74e606a270c5a05f93afa584979f65f15005ac33.zip
CMake-74e606a270c5a05f93afa584979f65f15005ac33.tar.gz
CMake-74e606a270c5a05f93afa584979f65f15005ac33.tar.bz2
ENH: play it safe and restore the value of LC_MESSAGES
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestUpdateHandler.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx
index d24d8f3..e6a6073 100644
--- a/Source/CTest/cmCTestUpdateHandler.cxx
+++ b/Source/CTest/cmCTestUpdateHandler.cxx
@@ -253,7 +253,12 @@ int cmCTestUpdateHandler::ProcessHandler()
std::string errors;
// 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
if(! (lcmess && strcmp(lcmess, "en_EN") == 0))
@@ -1110,7 +1115,18 @@ int cmCTestUpdateHandler::ProcessHandler()
}
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 )
{
cmCTestLog(this->CTest, ERROR_MESSAGE,