On Tue, Feb 6, 2018 at 7:36 PM, Ashok Kumar Mishra <
as...@multicorewareinc.com> wrote:

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


Thanks. Pushed to default.
_______________________________________________
x265-devel mailing list
x265-devel@videolan.org
https://mailman.videolan.org/listinfo/x265-devel

Reply via email to