Subject: Re: Comparing version numbers
To: None <firstname.lastname@example.org>
From: Julien Letessier <email@example.com>
Date: 08/05/2002 09:35:48
Alistair Crooks wrote:
>>>'rc' encodes as release candidate, which is -1
>>No, not just "-1". How do you compare "1.rc2" against "1.rc3"?
> Thanks for your suggestion, but I believe you've completely missed
> the point. If "rc" was encoded to ".0.", then 1.0rc1 would be
> greater than 1.0. The whole point of making "rc" negative was so
> that release candidates would sort BEFORE the release.
Anyways, thanks everybody for the help.
Al: the C code helps much :)
though not documented, it's pretty clear!
I think this concludes the debate on version number comparison. The
current algorithm is pretty clever, and easy to implement in any
language (in my case, python).
Julien T. Letessier
Sun Labs Europe, Meylan, France