monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Release rules Was: Re: [Monotone-devel] conflicts store vs show_conf


From: Hendrik Boom
Subject: Re: Release rules Was: Re: [Monotone-devel] conflicts store vs show_conflicts
Date: Mon, 22 Nov 2010 10:43:56 -0500
User-agent: Mutt/1.5.18 (2008-05-17)

On Mon, Nov 22, 2010 at 10:18:47AM -0500, Hendrik Boom wrote:
> On Mon, Nov 22, 2010 at 08:17:38AM -0600, Timothy Brownawell wrote:
> >
> > So I think basically rpm requires X.Y.Z even/odd scheme in order to  
> > distinguish release/dev. Which is annoying.
> 
> The colon classification system had a scheme where some symbols would 
> collate before end-od-string.  They used lower-case letters for this, so 
>     75a came before 75
>     75 came before 75A
> Are there any such characters for use with the well-known package 
> managers?

Yes, there is one -- the tilde.  Here's a part of the DEbian 
specification for how upstream version numbers (i.e., ours) are to be 
sorted.I quote from 
http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version

===========

First the initial part of each string consisting entirely of non-digit 
characters is determined. These two parts (one of which may be empty) 
are compared lexically. If a difference is found it is returned. The 
lexical comparison is a comparison of ASCII values modified so that all 
the letters sort earlier than all the non-letters and so that a tilde 
sorts before anything, even the end of a part. For example, the 
following parts are in sorted order from earliest to latest: ~~, ~~a, ~, 
the empty part, a.[

Then the initial part of the remainder of each string which consists 
entirely of digit characters is determined. The numerical values of 
these two parts are compared, and any difference found is returned as 
the result of the comparison. For these purposes an empty string (which 
can only occur at the end of one or both version strings being compared) 
counts as zero.

These two steps (comparing and removing initial non-digit strings and 
initial digit strings) are repeated until a difference is found or both 
strings are exhausted. 

===========

This if we add ~dev7 to version number 1.1, we'll get version 1.1~dev7, 
which will sort before version 1.1

This sounds like the numbering system we're looking for.

Of course, this isn't the *entire* comparison alrorithm. There's also 
an epoch and a Debian-specific attachment to the verison number.  Check 
the link above for further details.

-- hendrik



reply via email to

[Prev in Thread] Current Thread [Next in Thread]