Mercurial > wow > ouroloot
diff core.lua @ 62:d5fe3482db67
Be smarter about revision checking. ALL the revision checking.
author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
---|---|
date | Fri, 20 Apr 2012 03:29:24 +0000 |
parents | 99ab21f0755f |
children | 00bf6d4f9238 |
line wrap: on
line diff
--- a/core.lua Thu Apr 19 00:52:37 2012 +0000 +++ b/core.lua Fri Apr 20 03:29:24 2012 +0000 @@ -105,7 +105,7 @@ ------ Constants local option_defaults = { - ['datarev'] = 16, -- cheating, this isn't actually an option + ['datarev'] = 17, -- cheating, this isn't actually an option ['popup_on_join'] = true, ['register_slashloot'] = true, ['scroll_to_bottom'] = true, @@ -266,15 +266,17 @@ -- (e.g., 2016001) will always be higher than those of development packages -- (e.g., 87), due to the tagging system versus subversion file revs. This -- is good, as local dev code will never trigger a false positive update --- warning for other users. The downside is that additional decimal places --- in the Version field for bugfixes (e.g., "2.16.4.1") imposes a high-water --- mark, as subsequent shorter strings ("2.16.5", "2.17") will never be larger. --- Will need to redo this so it's not quite so dumb. +-- warning for other users. do local r = 0 for d in addon.revision:gmatch("%d+") do r = 1000*r + d end + -- If it's a big enough number to obviously be a release, then make + -- sure it's big enough to overcome many small point releases. + while r > 2000 and r < 2000000 do + r = 1000*r + end revision_large = math.max(r,1) end @@ -568,6 +570,7 @@ stored_datarev = 17 end if dirty then self:Print("Saved data has been massaged into shape.") end + assert(stored_datarev==opts.datarev) end _init(self)