[x265] [X265] [Fix Patch] [Master, Release 3.5 branches] fix: avoids unnecessary lexicographic order checks on git changesets, corrects version reporting
Srikanth Kurapati
srikanth.kurapati at multicorewareinc.com
Tue Dec 22 08:54:52 UTC 2020
>From 123a406a4845ec228bd234693115e6ffb6bc423f Mon Sep 17 00:00:00 2001
From: Srikanth Kurapati <srikanth.kurapati at multicorewareinc.com>
Date: Wed, 16 Dec 2020 10:52:33 +0530
Subject: [PATCH] fix: avoids unnecessary lexicographic order checks on git
changesets
and correct variables used for git archive version reporting
---
source/cmake/Version.cmake | 28 ++++++++++------------------
1 file changed, 10 insertions(+), 18 deletions(-)
diff --git a/source/cmake/Version.cmake b/source/cmake/Version.cmake
index 37c759268..21730cf91 100644
--- a/source/cmake/Version.cmake
+++ b/source/cmake/Version.cmake
@@ -152,14 +152,14 @@ elseif(GIT_ARCHETYPE STREQUAL "1")
message(WARNING "RELEASE CHANGESET INFO NOT PRESENT IN VERSION
FILE")
endif()
if(DEFINED git_repositorychangeset)
- string(SUBSTRING "${git_repositorychangeset}" 0 9 X265_REPO_ID)
+ string(SUBSTRING "${git_repositorychangeset}" 0 9 X265_REPO_ID)
else()
- message(STATUS "X265 LATEST COMMIT TIP INFORMATION NOT
AVAILABLE")
+ message(STATUS "X265 LATEST COMMIT TIP INFORMATION NOT
AVAILABLE")
endif()
if(DEFINED git_releasetagdistance)
- set(X265_TAG_DISTANCE ${git_releasetagdistance})
+ set(X265_TAG_DISTANCE ${git_releasetagdistance})
else()
- message(WARNING "COMMIT INFORMATION AFTER LATEST REVISION
UNAVAILABLE")
+ message(WARNING "COMMIT INFORMATION AFTER LATEST REVISION
UNAVAILABLE")
endif()
else()
message(WARNING "X265 RELEASE VERSION LABEL MISSING:
${X265_LATEST_TAG}")
@@ -168,25 +168,17 @@ endif()
# formatting based on positive or negative distance from tag
if(X265_TAG_DISTANCE STREQUAL "0")
- if(X265_REVISION_ID STREQUAL X265_REPO_ID)
- set(X265_VERSION "${X265_LATEST_TAG}")
- else()
- message(WARNING "REPO AND RELEASE CHANGESETS NOT MATCHING")
- endif()
+ set(X265_VERSION "${X265_LATEST_TAG}")
elseif(X265_TAG_DISTANCE STRGREATER "0")
- if(X265_REVISION_ID STRLESS X265_REPO_ID)
- set(X265_VERSION
"${X265_LATEST_TAG}+${X265_TAG_DISTANCE}-${X265_REVISION_ID}")
+ if(GIT_ARCHETYPE STREQUAL "1")
+ set(X265_VERSION
"${X265_LATEST_TAG}+${X265_TAG_DISTANCE}-${X265_REPO_ID}")
else()
- message(WARNING "ARCCHIVE TIP CHANGESET TO BE GREATER THAN
REVISION ID")
+ set(X265_VERSION
"${X265_LATEST_TAG}+${X265_TAG_DISTANCE}-${X265_REVISION_ID}")
endif()
elseif(X265_TAG_DISTANCE STRLESS "0")
- if(X265_REVISION_ID STRGREATER X265_REPO_ID)
- set(X265_VERSION
"${X265_LATEST_TAG}${X265_TAG_DISTANCE}+${X265_REPO_ID}")
- else()
- message(WARNING "REVISION ID EXPECTED TO BE LARGER THAN ARCHIVE
TIP CHANGESET")
- endif()
+ set(X265_VERSION
"${X265_LATEST_TAG}${X265_TAG_DISTANCE}+${X265_REPO_ID}")
else()
- message(ERROR "Inappropriate set of version information")
+ message(ERROR "Inappropriate version information")
endif()
#will always be printed in its entirety based on version file
configuration to avail revision monitoring by repo owners
--
2.20.1.windows.1
--
*With Regards,*
*Srikanth Kurapati.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20201222/19691f21/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-avoids-unnecessary-lexicographic-order-checks-on.patch
Type: application/octet-stream
Size: 3127 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20201222/19691f21/attachment.obj>
More information about the x265-devel
mailing list