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

Reply via email to