buildlogs: index.php - hilight exceprts from errors
glen
glen at pld-linux.org
Sat Sep 7 18:58:58 CEST 2013
Author: glen Date: Sat Sep 7 16:58:58 2013 GMT
Module: buildlogs Tag: HEAD
---- Log message:
- hilight exceprts from errors
---- Files affected:
buildlogs:
index.php (1.20 -> 1.21)
---- Diffs:
================================================================
Index: buildlogs/index.php
diff -u buildlogs/index.php:1.20 buildlogs/index.php:1.21
--- buildlogs/index.php:1.20 Fri Jun 22 14:11:12 2012
+++ buildlogs/index.php Sat Sep 7 18:58:53 2013
@@ -366,19 +366,22 @@
// highlight errors
if (preg_match("/errors?:/i", $s)) {
$err_count++;
- $s = "<span class=error id=error-$err_count>$s</span>";
$toc[] = "error $err_count";
+ $err[] = $s;
+ $s = "<span class=error id=error-$err_count>$s</span>";
} elseif (substr($s, 0, 2) == "+ ") {
// shell verbose
$s = "<span class=verbose>$s</span>";
} elseif (preg_match("/^Executing\(%(?P<section>\w+)\)/", $s, $m)) {
// rpm build section
- $s = "<span class=section id={$m['section']}>$s</span>";
$toc[] = $m['section'];
+ $err[] = $s;
+ $s = "<span class=section id={$m['section']}>$s</span>";
} elseif (preg_match("/^Processing files: (?P<pkg>(?P<name>.+)-[^-]+-[^-]+)/", $s, $m)) {
// processing files
- $s = "<span class=section id=files-{$m['name']}>$s</span>";
$toc[] = "files ".$m['name'];
+ $err[] = $s;
+ $s = "<span class=section id=files-{$m['name']}>$s</span>";
}
echo $s;
}
@@ -389,9 +392,10 @@
if (!empty($toc)) {
echo "<h2>"._("Toc:")."</h2>";
echo "<ul class=toc>";
- foreach ($toc as $section) {
+ foreach ($toc as $i => $section) {
$id = str_replace(" ", "-", $section);
echo "<li><a href=#{$id}>{$section}</a></li>";
+ echo "<code>{$err[$i]}</code>";
}
echo "</ul>";
}
================================================================
---- CVS-web:
http://cvs.pld-linux.org/buildlogs/index.php?r1=1.20&r2=1.21
More information about the pld-cvs-commit
mailing list