\n";
+ }
my $comment = $co{'comment'};
+ print "
\n";
foreach my $line (@$comment) {
- $line = to_utf8($line);
- print "$line
\n";
+ $line = esc_html($line);
+ print "$line\n";
}
- print "
\n";
- foreach my $line (@difftree) {
- if (!($line =~ m/^:([0-7]{6}) ([0-7]{6}) ([0-9a-fA-F]{40}) ([0-9a-fA-F]{40}) (.)([0-9]{0,3})\t(.*)$/)) {
- next;
+ print "\n";
+ foreach my $difftree_line (@difftree) {
+ my %difftree = parse_difftree_raw_line($difftree_line);
+ next if !$difftree{'from_id'};
+
+ my $file = $difftree{'file'} || $difftree{'to_file'};
+
+ print "- " .
+ "[" .
+ $cgi->a({-href => href(-full=>1, action=>"blobdiff",
+ hash=>$difftree{'to_id'}, hash_parent=>$difftree{'from_id'},
+ hash_base=>$co{'id'}, hash_parent_base=>$co{'parent'},
+ file_name=>$file, file_parent=>$difftree{'from_file'}),
+ -title => "diff"}, 'D');
+ if ($have_blame) {
+ print $cgi->a({-href => href(-full=>1, action=>"blame",
+ file_name=>$file, hash_base=>$commit),
+ -title => "blame"}, 'B');
+ }
+ # if this is not a feed of a file history
+ if (!defined $file_name || $file_name ne $file) {
+ print $cgi->a({-href => href(-full=>1, action=>"history",
+ file_name=>$file, hash=>$commit),
+ -title => "history"}, 'H');
}
- my $file = esc_path(unquote($7));
- $file = to_utf8($file);
- print "$file
\n";
+ $file = esc_path($file);
+ print "] ".
+ "$file \n";
+ }
+ if ($format eq 'rss') {
+ print "
]]>\n" .
+ "\n" .
+ "\n";
+ } elsif ($format eq 'atom') {
+ print "\n
\n" .
+ "