[cmake-commits] alex committed FindSubversion.cmake 1.1 1.2
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Jan 14 17:19:22 EST 2008
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv29032
Modified Files:
FindSubversion.cmake
Log Message:
BUG: set LC_ALL to C, so message from svn are not translated, which can lead
to problems (since the output is parsed, which fails then)
Brad, Bill, can you think of any reasons this change might create problems ?
Alex
Index: FindSubversion.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindSubversion.cmake,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- FindSubversion.cmake 30 Oct 2006 20:30:59 -0000 1.1
+++ FindSubversion.cmake 14 Jan 2008 22:19:20 -0000 1.2
@@ -52,6 +52,11 @@
SET(Subversion_FOUND FALSE)
SET(Subversion_SVN_FOUND FALSE)
+# the subversion commands should be executed with the C locale, otherwise
+# the message (which are parsed) may be translated, Alex
+SET(_Subversion_SAVED_LC_ALL "$ENV{LC_ALL}" )
+SET(ENV{LC_ALL} C)
+
FIND_PROGRAM(Subversion_SVN_EXECUTABLE svn
DOC "subversion command line client")
MARK_AS_ADVANCED(Subversion_SVN_EXECUTABLE)
@@ -105,6 +110,9 @@
ENDIF(Subversion_SVN_EXECUTABLE)
+# restore the previous LC_ALL
+SET(ENV{LC_ALL} ${_Subversion_SAVED_LC_ALL})
+
IF(NOT Subversion_FOUND)
IF(NOT Subversion_FIND_QUIETLY)
MESSAGE(STATUS "Subversion was not found.")
More information about the Cmake-commits
mailing list