+} elsif ($action eq "filerevision") {
+ open my $fd, "-|", "$gitbin/rev-list $hash";
+ my (@revlist) = map { chomp; $_ } <$fd>;
+ close $fd;
+
+ git_header_html();
+ print "<div class=\"page_body\">\n" .
+ "<pre>\n";
+ foreach my $rev (@revlist) {
+ my %co = git_commit($rev);
+ my $parents = $co{'parents'};
+ foreach my $parent (@$parents) {
+ open $fd, "-|", "$gitbin/diff-tree -r $parent $rev $file_name";
+ my (@difftree) = map { chomp; $_ } <$fd>;
+ close $fd;
+
+ foreach my $line (@difftree) {
+ $line =~ m/^(.)(.*)\t(.*)\t(.*)\t(.*)$/;
+ my $file = $5;
+ if ($file eq $file_name) {
+ print $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$rev"}, $rev) . " (" . $co{'title'} .")\n";
+ last;
+ }
+ }
+ }
+ }
+ print "<br/></pre>\n";
+ print "</div>";
+ git_footer_html();