+ if ($type ne "blob") {
+ next;
+ }
+ print "<tr>\n";
+ if ($op eq "+") {
+ my $mode_chng = "";
+ if (S_ISREG(oct $mode)) {
+ $mode_chng = sprintf(" with mode: %04o", (oct $mode) & 0777);
+ }
+ print "<td>" .
+ $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$id;hp=$hash;f=$file", -class => "list"}, escapeHTML($file)) . "</td>\n" .
+ "<td><span style=\"color: #008000;\">[new " . file_type($mode) . "$mode_chng]</span></td>\n" .
+ "<td class=\"link\">" . $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$id;hb=$hash;f=$file"}, "blob") . "</td>\n";
+ } elsif ($op eq "-") {
+ print "<td>" .
+ $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$id;hb=$hash;f=$file", -class => "list"}, escapeHTML($file)) . "</td>\n" .
+ "<td><span style=\"color: #c00000;\">[deleted " . file_type($mode). "]</span></td>\n" .
+ "<td class=\"link\">" .
+ $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$id;hb=$hash;f=$file"}, "blob") .
+ " | " . $cgi->a({-href => "$my_uri?p=$project;a=history;h=$hash;f=$file"}, "history") .
+ "</td>\n"
+ } elsif ($op eq "*") {
+ $id =~ m/([0-9a-fA-F]+)->([0-9a-fA-F]+)/;
+ my $from_id = $1;
+ my $to_id = $2;
+ $mode =~ m/^([0-7]{6})->([0-7]{6})$/;
+ my $from_mode = $1;
+ my $to_mode = $2;
+ my $mode_chnge = "";
+ if ($from_mode != $to_mode) {
+ $mode_chnge = " <span style=\"color: #777777;\">[changed";
+ if (((oct $from_mode) & S_IFMT) != ((oct $to_mode) & S_IFMT)) {
+ $mode_chnge .= " from " . file_type($from_mode) . " to " . file_type($to_mode);