Control: tags -1 + patch Attached is a patch which implements backports colour coding.
I have used the same colours that are already in use for the watch and Ubuntu version comparisons. green: Backport version is in sync with version in testing magenta: Backport version is greater than version in testing navy blue: Backport version is lower than version in testing The patch also adds a full title for the backport, to display the same information as is displayed for stable etc versions. I have removed the link for stable-backports, as these are now in the main pool (but oldstable-backports retain a link to the old backports pool). Regards Daniel
Index: developer.wml =================================================================== --- developer.wml (revision 3261) +++ developer.wml (working copy) @@ -378,8 +378,10 @@ ": package in stable proposed updates (not shown if also in stable security)" . html_br(); $help_data .= html_blank(). html_span("Light blue", "", "proposed-updates-new") . ": package " . html_a("pending", "http://ftp-master.debian.org/proposed-updates.html") . " for stable proposed updates (not shown if also in stable security)" . html_br(); - $help_data .= html_blank(). html_span("Dark purple", "", "bpo") . ": package on " . - html_a("backports.org", "http://backports.org/") . html_br(); + $help_data .= "oldstable and stable backports are color-coded against the version in testing (since wheezy backports have been integrated into the main pool)" . html_br(); + $help_data .= html_blank().html_blank(). html_span("green", "", "uptodate") . ": Backport version is in sync with version in testing" . html_br(); + $help_data .= html_blank().html_blank(). html_span("magenta", "", "behind") . ": Backport version is greater than version in testing" . html_br(); + $help_data .= html_blank().html_blank(). html_span("navy blue", "", "ahead") . ": Backport version is lower than version in testing" . html_br(); $help_data .= html_blank(). html_span("Purple", "", "testing") . ": testing version" . html_br(); $help_data .= html_blank(). html_span("Green", "", "unstable") . @@ -674,13 +676,10 @@ /* annotate version number with mouseover title */ function format_version($package, $version, $class) { - global $uploads_db; global $releases_re; if (!$version or !strcmp($version, "-")) return "-"; - $changedby = dba_fetch("ch:$package:$version", $uploads_db); - if (!$changedby) - $changedby = "(no projectb data found)"; + $changedby = changed_by($package, $version); $pclass = $class; if(preg_match("/(-[0-9]+\.|\+nmu)[0-9]+$/", $version)) $class = "nmu"; @@ -692,6 +691,18 @@ return html_span($version, "", $class, "title=\"$pclass: $changedby\""); } +/* package changed by */ +function changed_by($package, $version) +{ + global $uploads_db; + if (!$version or !strcmp($version, "-")) + return "-"; + $changedby = dba_fetch("ch:$package:$version", $uploads_db); + if (!$changedby) + $changedby = "(no projectb data found)"; + return $changedby; +} + /* This function prints a package table information row */ @@ -905,7 +916,22 @@ if ($tag) { $url = dba_fetch("$tag-url:$package", $incoming_db); $title = dba_fetch("$tag-title:$package", $incoming_db); - $ver .= html_br() . html_a($version[$subdist], $url, $subdist, $title); + + if ($tag === "bpo" or $tag === "oldstable-bpo") { + //Append the changed_by information to the title + $title .= ": " . changed_by($package, $version[$subdist]); + // Compare bpo version to testing + $bpo_version = substr($version[$subdist], 0, strpos($version[$subdist], "~bpo")); + $ver_comp = debversion_compare($bpo_version, $version['testing']); + $class = $ver_comp > 0 ? 'behind' : ($ver_comp < 0 ? 'ahead' : 'uptodate'); + if (strpos($title, "squeeze-backports") !== False) { // squeeze backports are not in the main pool + $ver .= html_br() . html_a(html_span($version[$subdist], "", $class), $url, $class, $title); + } else { + $ver .= html_br() . html_span($version[$subdist], "", $class, "title=\"$title\""); + } + } else { + $ver .= html_br() . html_a($version[$subdist], $url, $subdist, $title); + } } else { $ver .= html_br() . format_version($package, $version[$subdist], $subdist); }
signature.asc
Description: OpenPGP digital signature