mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-24 01:48:44 +00:00
Changed: Use hg log -r . instead of hg tip to get last revision
This commit is contained in:
parent
9655669de6
commit
dcfed04005
1 changed files with 3 additions and 3 deletions
|
@ -60,12 +60,12 @@ IF(Mercurial_HG_EXECUTABLE)
|
||||||
EXECUTE_PROCESS(COMMAND ${Mercurial_HG_EXECUTABLE} --version
|
EXECUTE_PROCESS(COMMAND ${Mercurial_HG_EXECUTABLE} --version
|
||||||
OUTPUT_VARIABLE Mercurial_VERSION_HG
|
OUTPUT_VARIABLE Mercurial_VERSION_HG
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
STRING(REGEX REPLACE ".*version ([\\.0-9]+).*"
|
STRING(REGEX REPLACE ".*version ([\\.0-9]+).*"
|
||||||
"\\1" Mercurial_VERSION_HG "${Mercurial_VERSION_HG}")
|
"\\1" Mercurial_VERSION_HG "${Mercurial_VERSION_HG}")
|
||||||
|
|
||||||
MACRO(Mercurial_WC_INFO dir prefix)
|
MACRO(Mercurial_WC_INFO dir prefix)
|
||||||
EXECUTE_PROCESS(COMMAND ${Mercurial_HG_EXECUTABLE} tip --template "{rev};{node};{tags};{author}"
|
EXECUTE_PROCESS(COMMAND ${Mercurial_HG_EXECUTABLE} log -r . --template "{rev};{node};{tags};{author}"
|
||||||
WORKING_DIRECTORY ${dir}
|
WORKING_DIRECTORY ${dir}
|
||||||
OUTPUT_VARIABLE ${prefix}_WC_INFO
|
OUTPUT_VARIABLE ${prefix}_WC_INFO
|
||||||
ERROR_VARIABLE Mercurial_hg_info_error
|
ERROR_VARIABLE Mercurial_hg_info_error
|
||||||
|
@ -73,7 +73,7 @@ IF(Mercurial_HG_EXECUTABLE)
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
IF(NOT ${Mercurial_hg_info_result} EQUAL 0)
|
IF(NOT ${Mercurial_hg_info_result} EQUAL 0)
|
||||||
MESSAGE(SEND_ERROR "Command \"${Mercurial_HG_EXECUTABLE} tip\" failed with output:\n${Mercurial_hg_info_error}")
|
MESSAGE(SEND_ERROR "Command \"${Mercurial_HG_EXECUTABLE} log\" failed with output:\n${Mercurial_hg_info_error}")
|
||||||
ELSE()
|
ELSE()
|
||||||
LIST(LENGTH ${prefix}_WC_INFO _COUNT)
|
LIST(LENGTH ${prefix}_WC_INFO _COUNT)
|
||||||
IF(_COUNT EQUAL 4)
|
IF(_COUNT EQUAL 4)
|
||||||
|
|
Loading…
Reference in a new issue