<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 3, 2018 at 11:36 AM, David Christenson <span dir="ltr"><<a href="mailto:mail@noctem.xyz" target="_blank">mail@noctem.xyz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"># HG changeset patch<br>
# User David Christenson <<a href="mailto:mail@noctem.xyz">mail@noctem.xyz</a>><br>
# Date 1517635098 25200<br>
# Fri Feb 02 22:18:18 2018 -0700<br>
# Node ID 2b5f3ebe01167dc90365a06ac25ff3<wbr>caec4a9495<br>
# Parent 1949157705cef7e6e97df116e2f716<wbr>36f4cb0025<br>
CMake: fix generation of version info from .hg_archival.txt<br>
<br>
When building from a commit more recent than the latest tag, version.cmake<br>
wouldn't set X265_LATEST_TAG and X265_TAG_DISTANCE resulting in their defaults<br>
(0.0 and 0) being used. Also truncate the revision ID to 12 characters to match<br>
the length used when parsing from the hg executable.<br>
<br>
diff --git a/source/cmake/version.cmake b/source/cmake/version.cmake<br>
--- a/source/cmake/version.cmake<br>
+++ b/source/cmake/version.cmake<br>
@@ -17,22 +17,21 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/..<br>
foreach(f ${archive})<br>
string(FIND "${f}" ": " pos)<br>
string(SUBSTRING "${f}" 0 ${pos} key)<br>
string(SUBSTRING "${f}" ${pos} -1 value)<br>
string(SUBSTRING "${value}" 2 -1 value)<br>
set(hg_${key} ${value})<br>
endforeach()<br>
if(DEFINED hg_tag)<br>
- set(X265_VERSION ${hg_tag})<br>
set(X265_LATEST_TAG ${hg_tag})<br>
- set(X265_TAG_DISTANCE "0")<br>
elseif(DEFINED hg_node)<br>
- string(SUBSTRING "${hg_node}" 0 16 hg_id)<br>
- set(X265_VERSION "${hg_latesttag}+${hg_<wbr>latesttagdistance}-${hg_id}")<br>
+ set(X265_LATEST_TAG ${hg_latesttag})<br>
+ set(X265_TAG_DISTANCE ${hg_latesttagdistance})<br>
+ string(SUBSTRING "${hg_node}" 0 12 X265_REVISION_ID)<br>
endif()<br>
elseif(HG_EXECUTABLE AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/..<wbr>/.hg)<br>
if(EXISTS "${HG_EXECUTABLE}.bat")<br>
# mercurial source installs on Windows require .bat extension<br>
set(HG_EXECUTABLE "${HG_EXECUTABLE}.bat")<br>
endif()<br>
message(STATUS "hg found at ${HG_EXECUTABLE}")<br>
<br>
<br>______________________________<wbr>_________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/<wbr>listinfo/x265-devel</a><br>
<br></blockquote></div><div class="gmail_extra"><br></div>David,</div><div class="gmail_extra">Thank you for sending this patch, we are ready to push it into public repo. </div><div class="gmail_extra"><span style="font-size:12.8px">Have you signed the x265 contributor license agreement in the past?</span></div><div class="gmail_extra"><span style="font-size:12.8px">If so, could you please resend the soft-copy of CLA, else you can download it from </span><a href="https://bitbucket.org/multicoreware/x265/downloads/x265ContributorAgreement.pdf" target="_blank" style="font-size:12.8px">here</a><span style="font-size:12.8px">, sign it, and send us a copy.</span><br></div></div>