% use File::Basename 'basename';
<%
my $operation = stash('operation') || 'tree';
unless ($operation eq 'commits' || $operation eq 'tree') {
$operation = 'tree';
}
my $rev = stash('id') || stash('rev');
my $prefix = stash('prefix');
%>
% if ($prefix) {
History for
% }
">
<%= $project %>
% if (defined $Path) {
/
% my @parts = split('/', $Path);
% my $path;
% for (my $i = 0; $i < @parts; $i++) {
% my $part = $parts[$i];
% $path .= $part;
% if ($type eq 'blob' && $i == @parts - 1) {
<%= $part %>
% } else {
">
<%= $part %>
% $path .= '/';
% }
% unless ($type eq 'blob' && $i == @parts - 1) {
/
% }
% }
% }