[Cmake-commits] [cmake-commits] king committed FindSubversion.cmake 1.3 1.4

cmake-commits at cmake.org cmake-commits at cmake.org
Mon May 19 10:04:01 EDT 2008


Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv24688/Modules

Modified Files:
	FindSubversion.cmake 
Log Message:
BUG: Fixes for FindSubversion

  - Split log out from Subversion_WC_INFO into Subversion_WC_LOG
  - Fix report of log info to be in <var-prefix>_WC_LAST_CHANGED_LOG
    as documented (instead of Subversion_LAST_CHANGED_LOG)
  - Fix setting of LC_ALL environment variable to be inside macro
  - Patch from Tanguy Krotoff
  - See issue #7047


Index: FindSubversion.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindSubversion.cmake,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** FindSubversion.cmake	20 Mar 2008 15:44:25 -0000	1.3
--- FindSubversion.cmake	19 May 2008 14:03:59 -0000	1.4
***************
*** 21,24 ****
--- 21,26 ----
  #    Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project)
  #    MESSAGE("Current revision is ${Project_WC_REVISION}")
+ #    Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project)
+ #    MESSAGE("Last changed log is ${Project_LAST_CHANGED_LOG}")
  #  ENDIF(Subversion_FOUND)
  
***************
*** 53,61 ****
  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")
--- 55,58 ----
***************
*** 67,70 ****
--- 64,72 ----
  
    MACRO(Subversion_WC_INFO dir prefix)
+     # 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)
+ 
      EXECUTE_PROCESS(COMMAND ${Subversion_SVN_EXECUTABLE} --version
        WORKING_DIRECTORY ${dir}
***************
*** 97,103 ****
      ENDIF(NOT ${Subversion_svn_info_result} EQUAL 0)
  
      EXECUTE_PROCESS(COMMAND
        ${Subversion_SVN_EXECUTABLE} log -r BASE ${dir}
!       OUTPUT_VARIABLE Subversion_LAST_CHANGED_LOG
        ERROR_VARIABLE Subversion_svn_log_error
        RESULT_VARIABLE Subversion_svn_log_result
--- 99,115 ----
      ENDIF(NOT ${Subversion_svn_info_result} EQUAL 0)
  
+     # restore the previous LC_ALL
+     SET(ENV{LC_ALL} ${_Subversion_SAVED_LC_ALL})
+ 
+   ENDMACRO(Subversion_WC_INFO)
+ 
+   MACRO(Subversion_WC_LOG dir prefix)
+     # This macro can block if the certificate is not signed:
+     # svn ask you to accept the certificate and wait for your answer
+     # This macro requires a svn server network access (Internet most of the time)
+     # and can also be slow since it access the svn server
      EXECUTE_PROCESS(COMMAND
        ${Subversion_SVN_EXECUTABLE} log -r BASE ${dir}
!       OUTPUT_VARIABLE ${prefix}_LAST_CHANGED_LOG
        ERROR_VARIABLE Subversion_svn_log_error
        RESULT_VARIABLE Subversion_svn_log_result
***************
*** 107,117 ****
        MESSAGE(SEND_ERROR "Command \"${Subversion_SVN_EXECUTABLE} log -r BASE ${dir}\" failed with output:\n${Subversion_svn_log_error}")
      ENDIF(NOT ${Subversion_svn_log_result} EQUAL 0)
!   ENDMACRO(Subversion_WC_INFO)
  
  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)
--- 119,126 ----
        MESSAGE(SEND_ERROR "Command \"${Subversion_SVN_EXECUTABLE} log -r BASE ${dir}\" failed with output:\n${Subversion_svn_log_error}")
      ENDIF(NOT ${Subversion_svn_log_result} EQUAL 0)
!   ENDMACRO(Subversion_WC_LOG)
  
  ENDIF(Subversion_SVN_EXECUTABLE)
  
  IF(NOT Subversion_FOUND)
    IF(NOT Subversion_FIND_QUIETLY)



More information about the Cmake-commits mailing list