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
This commit is contained in:
Bill Somerville 2014-03-29 02:20:48 +00:00
parent 8d4b36159b
commit 0930c8efed
1 changed files with 4 additions and 2 deletions

View File

@ -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