Yakov Lerner wrote:
On 9/11/06, Nikolai Weibull <[EMAIL PROTECTED]> wrote:
On 9/11/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:
[a way to create a list of what patches has been applied]
Here's a simpler version of that script that doesn't allow for patches
to be skipped. I don't know if the Vim build scripts actually allow
for patches to be skipped,
Yes it is allowed.
... and considering that later patches will
often depend on earlier ones, I can't see any reason why someone
wouldn't have applied patch i when they have applied patch j, where i
< j.
" Vim plugin file
" Maintainer: Nikolai Weibull <[EMAIL PROTECTED]>
" Latest Revision: 2006-09-11
if exists("g:patches")
finish
endif
let s:i = 1
let g:patches = [0]
while has("patch" . s:i)
call add(g:patches, s:i)
let s:i += 1
endwhile
unlet s:i
let g:version_string = (version / 100) . '.' . (version % 100) . '.' .
g:patches[-1]
I'd prefer
let g:full_version = version . sprintf("%03d", g:patches[-1])
because such version string is comparable for (<,<=,>,>=)
whereas g:full_version is not.
I'd consider patchlevel to be max # of hole-free sequence
of patches starting from 1 (I think patch numbers are 1-starting),
*not* max # of patch applied. The extreme example would be
single patch#100 applied (without patches 1-99) which does
*not* make patchlevel 100.
Yakov
(imaginary example) A Unix version might display
Applied patches: 1-5,7-13,17-25,27-42,48-55,58-60,62-66,69-74,77,79-85
in the ":version" listing and it would still display "Version 6.4.85"
near the top of the splash screen; and properly so, since patches
6,14-16,26,43-47,56,57,61,67,68,75,76 and 78 would quite possibly be
Windows and Mac patches. I remember Unix versions from 6.x which had
that kind of "applied patches". In this example, no one in his right
mind should consider such a version as "6.4.5".
Best regards,
Tony.