- print "<tr>\n";
- print "<td class=\"head1\">" . $age_string . "</td>\n";
- print "<td class=\"head1\">" . $cgi->a({-href => "$myself/$project/commit/$commit"}, $shortlog) . "</td>";
- print "</tr>\n";
- print "<tr>\n";
- print "<td class=\"head3\">";
- print $cgi->a({-href => "$myself/$project/treediff/$commit"}, "view diff") . "<br/>\n";
- print $cgi->a({-href => "$myself/$project/commit/$commit"}, "view commit") . "<br/>\n";
- print $cgi->a({-href => "$myself/$project/tree/$tree"}, "view tree") . "<br/>\n";
- print "</td>\n";
- print "<td class=\"head2\">\n";
- print "author " . escapeHTML($author) . " [" . gmtime($author_time) . " " . $author_timezone . "]<br/>\n";
- print "committer " . escapeHTML($committer) . " [" . gmtime($committer_time) . " " . $committer_timezone . "]<br/>\n";
- print "commit $commit<br/>\n";
- print "tree $tree<br/>\n";
- foreach my $par (@parents) {
- print "parent $par<br/>\n";
+ if ($action eq "log") {
+ if ($view_back > 0 && $age > $view_back*60*60*24) {
+ if ($i == 0) {
+ print "<tr>\n";
+ print "<td class=\"head1\"> Last change $age_string. </td>\n";
+ print "</tr>\n";
+ }
+ last;
+ }
+ print "<tr>\n";
+ print "<td class=\"head1\">" . $age_string . "</td>\n";
+ print "<td class=\"head1\">" . $cgi->a({-href => "$my_uri/$project/commit/$commit"}, $co{'title'}) . "</td>";
+ print "</tr>\n";
+ print "<tr>\n";
+ print "<td class=\"head3\">";
+ print $cgi->a({-href => "$my_uri/$project/commit/$commit"}, "view commit") . "<br/>\n";
+ print $cgi->a({-href => "$my_uri/$project/commitdiff/$commit"}, "view diff") . "<br/>\n";
+ print "</td>\n";
+ print "<td class=\"head2\">\n";
+ print "author " . escapeHTML($co{'author'}) . " [" . gmtime($co{'author_time'}) . " " . $co{'author_timezone'} . "]<br/>\n";
+ print "committer " . escapeHTML($co{'committer'}) . " [" . gmtime($co{'committer_time'}) . " " . $co{'committer_timezone'} . "]<br/>\n";
+ print "</td>";
+ print "</tr>\n";
+ print "<tr>\n";
+ print "<td></td>\n";
+ print "<td>\n";
+ my $comment = $co{'comment'};
+ foreach my $line (@$comment) {
+ if ($line =~ m/^(signed-off|acked)-by:/i) {
+ print '<div class="signed_off">' . escapeHTML($line) . "<br/></div>\n";
+ } else {
+ print escapeHTML($line) . "<br/>\n";
+ }
+ }
+ print "<br/><br/>\n";
+ print "</td>";
+ print "</tr>\n";
+ } elsif ($action eq "rss") {
+ last if ($i >= 20);
+ my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = gmtime($co{'author_time'});
+ my @months = ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
+ print "<item>\n\t<title>";
+ printf("%s %02d, %02d:%02d - ", $months[$mon], $mday, $hour, $min);
+ print escapeHTML($co{'title'}) . "</title>\n";
+ print "\t<link> " . $my_url . "/$project/commit/$commit</link>\n";
+ print "\t<description>";
+ my $comment = $co{'comment'};
+ foreach my $line (@$comment) {
+ print escapeHTML($line) . "\n";
+ }
+ print "\t</description>\n";
+ print "</item>\n";