Commits

dgc committed 8e3b102

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

  • Participants
  • Parent commits 99a81d6

Comments (0)

Files changed (1)

File static/js/download.js

     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 = {