dgc avatar 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

Comments (0)

Files changed (1)


     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 = {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.