[x265] [PATCH 1 of 3] Fix HG_REVISION_ID in Windows cmake

Ricardo Constantino wiiaboo at gmail.com
Tue May 31 15:17:24 CEST 2016


# HG changeset patch
# User Ricardo Constantino <wiiaboo at gmail.com>
# Date 1464699851 -3600
#      Tue May 31 14:04:11 2016 +0100
# Node ID 44a961fc08b75e77f0120fa869b1aefd167b075b
# Parent  6d3849d648f0be5a8e334f1d75a2f7cf93c86cb3
Fix HG_REVISION_ID in Windows cmake

diff -r 6d3849d648f0 -r 44a961fc08b7 source/cmake/version.cmake
--- a/source/cmake/version.cmake	Sun May 29 21:50:25 2016 +0800
+++ b/source/cmake/version.cmake	Tue May 31 14:04:11 2016 +0100
@@ -52,12 +52,13 @@
         )
     execute_process(
         COMMAND
-        ${HG_EXECUTABLE} log -r. --template "{node|short}"
+        ${HG_EXECUTABLE} log -r. --template "{node}"
         WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
         OUTPUT_VARIABLE HG_REVISION_ID
         ERROR_QUIET
         OUTPUT_STRIP_TRAILING_WHITESPACE
         )
+    string(SUBSTRING "${HG_REVISION_ID}" 0 16 HG_REVISION_ID)
 
     if(X265_LATEST_TAG MATCHES "^r")
         string(SUBSTRING ${X265_LATEST_TAG} 1 -1 X265_LATEST_TAG)


More information about the x265-devel mailing list