# HG changeset patch # User Oleksandr Gavenko # Date 1313704350 -10800 # Node ID 57b995de80b51d6e4c9801511a20856a155e35fb # Parent 23cb71bb2b5d6cd3c18cd53a37823bf6c3fa95a7 Compatibility formula. diff -r 23cb71bb2b5d -r 57b995de80b5 devel-versioning.rst --- a/devel-versioning.rst Fri Aug 19 00:17:19 2011 +0300 +++ b/devel-versioning.rst Fri Aug 19 00:52:30 2011 +0300 @@ -15,8 +15,8 @@ * QA test results (Pass/Fail). * Location of full logs. -Versioning formula. -=================== +Order formula. +============== if (A.major != B.major) return A.major > B.major; if (A.minor != B.minor) return A.minor > B.minor; @@ -26,6 +26,27 @@ if (B.special == "") return -1; return A.special > B.special; +**NOTE** Accoding to this definition 1.0.1rc1 < 1.0.1rc10 < 1.0.1rc2 which is +non meaningful. + +Compatibility formula. +====================== + +Assume that app linked with new version of lib. Thus + +is_compatible_with_old(old, new) { + if (old.major != new.major) return 0; + if (old.minor > new.minor) return 0; + return 1; +} + +Assume that app linked with old version of lib. Thus + +is_compatible_with_new(old, new) { + if (old.major != new.major) return 0; + return 1; +} + Reference. ==========