From 80bad29af6dbff6ea284d7a56735f85fc7476e5a Mon Sep 17 00:00:00 2001 From: Marcel Loose Date: Mon, 13 Sep 2010 13:13:12 +0200 Subject: [PATCH] Issue 10199: Fixed code documentation and now set _WC_ROOT --- Modules/FindSubversion.cmake | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Modules/FindSubversion.cmake b/Modules/FindSubversion.cmake index 9bad3b129..daf3d87f5 100644 --- a/Modules/FindSubversion.cmake +++ b/Modules/FindSubversion.cmake @@ -8,18 +8,22 @@ # The minimum required version of Subversion can be specified using the # standard syntax, e.g. FIND_PACKAGE(Subversion 1.4) # -# If the command line client executable is found the macro +# If the command line client executable is found two macros are defined: # Subversion_WC_INFO( ) -# is defined to extract information of a subversion working copy at -# a given location. The macro defines the following variables: +# Subversion_WC_LOG( ) +# Subversion_WC_INFO extracts information of a subversion working copy at +# a given location. This macro defines the following variables: # _WC_URL - url of the repository (at ) # _WC_ROOT - root url of the repository # _WC_REVISION - current revision # _WC_LAST_CHANGED_AUTHOR - author of last commit # _WC_LAST_CHANGED_DATE - date of last commit # _WC_LAST_CHANGED_REV - revision of last commit -# _WC_LAST_CHANGED_LOG - last log of base revision # _WC_INFO - output of command `svn info ' +# Subversion_WC_LOG retrieves the log message of the base revision of a +# subversion working copy at a given location. This macro defines the +# variable: +# _LAST_CHANGED_LOG - last log of base revision # Example usage: # FIND_PACKAGE(Subversion) # IF(SUBVERSION_FOUND) @@ -74,6 +78,8 @@ IF(Subversion_SVN_EXECUTABLE) STRING(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*" "\\2" ${prefix}_WC_URL "${${prefix}_WC_INFO}") + STRING(REGEX REPLACE "^(.*\n)?Repository Root: ([^\n]+).*" + "\\2" ${prefix}_WC_ROOT "${${prefix}_WC_INFO}") STRING(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*" "\\2" ${prefix}_WC_REVISION "${${prefix}_WC_INFO}") STRING(REGEX REPLACE "^(.*\n)?Last Changed Author: ([^\n]+).*"