From ccc84da702f41d36db5bd833470190528c80047f Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Sat, 29 Mar 2014 02:20:48 +0000 Subject: [PATCH] Make revision fetching compatible with git-svn. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3952 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- CMake/getsvn.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMake/getsvn.cmake b/CMake/getsvn.cmake index e91b27be9..f32f42698 100644 --- a/CMake/getsvn.cmake +++ b/CMake/getsvn.cmake @@ -35,8 +35,10 @@ if (Subversion_FOUND AND EXISTS "${SOURCE_DIR}/.git") RESULT_VARIABLE __git_svn_status OUTPUT_FILE "${OUTPUT_DIR}/svn_status.txt" OUTPUT_STRIP_TRAILING_WHITESPACE) - message (STATUS "git-svn status: ${__git_svn_status}") - if (NOT ${__git_svn_status} EQUAL 0) + file (STRINGS "${OUTPUT_DIR}/svn_status.txt" __svn_changes + REGEX "^diff-tree" + ) + if ((NOT ${__git_svn_status} EQUAL 0) OR __svn_changes) set (MY_WC_REVISION "${MY_WC_REVISION}-dirty") endif () # write a file with the SVNVERSION define