# HG changeset patch # User David Champion # Date 1299088054 21600 # Node ID 8e3b10220bb985e24c27318f48f6e9765af18f79 # Parent 99a81d6b669a6e3e33fada0b4de6214b2729d0ad Mercurial version x.y.z, z=0 is always incorrect; disregard. An erroneous latest.dat should be fixed, but this patch will prevent such errors from having a negative effect on the website. (They cause prior versions not to be displayed even when they should be, if Downloader.maxversions is nonzero.) geocommit(1.0): lat 49.0076053, long 8.4207923, hacc 82.0, src nmg; Karlsruhe DE diff -r 99a81d6b669a -r 8e3b10220bb9 static/js/download.js --- a/static/js/download.js Thu Mar 03 14:11:58 2011 +0100 +++ b/static/js/download.js Wed Mar 02 11:47:34 2011 -0600 @@ -3,6 +3,14 @@ this.regex = source[1]; this.url = source[2]; this.desc = source[3]; + + // Strip '.0' version suffix, unless it is for a minor version. + // It is always incorrect for Mercurial releases. + var points = this.version.split('.'); + if (points.length > 2 && points[points.length-1] == "0") { + points.pop(); + this.version = points.join("."); + } } Download.prototype = {