<?php
/*=====================================================================*\
|| ################################################################### ||
|| # ViewSVN [#]version[#]
|| # --------------------------------------------------------------- # ||
|| # Copyright ©2002-[#]year[#] by Iris Studios, Inc. All Rights Reserved. # ||
|| # This file may not be reproduced in any way without permission. # ||
|| # --------------------------------------------------------------- # ||
|| # User License Agreement at http://www.iris-studios.com/license/ # ||
|| ################################################################### ||
\*=====================================================================*/
require_once('./global.php');
$path = $viewsvn->paths->parse();
$repos = $viewsvn->paths->fetch_repos($path);
$relpath = $viewsvn->paths->fetch_path($path);
echo $viewsvn->paths->construct_breadcrumb($path, false);
echo '<br />';
echo '<a href="/viewsvn/' . $viewsvn->paths->out('log.php' . $viewsvn->paths->fetch_rev_str(), $path) . '">View Log</a>';
if ($viewsvn->svn->common->fetch_head_rev($path) != $viewsvn->paths->fetch_rev_num() AND $viewsvn->paths->fetch_rev_num() != 'HEAD')
{
echo ' - <a href="/viewsvn/' . $viewsvn->paths->out('blame.php' . $viewsvn->paths->fetch_rev_str(false, 'HEAD'), $path) . '">Go to HEAD</a>';
echo ' - <a href="/viewsvn/' . $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, 'HEAD', $viewsvn->paths->fetch_rev_num()), $path) . '">Diff to HEAD</a>';
}
$prev = $viewsvn->svn->common->fetch_prev_rev($path, $viewsvn->paths->fetch_rev_num());
if ($prev != -1)
{
echo ' - <a href="/viewsvn/' . $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, $viewsvn->paths->fetch_rev_num(), $prev), $path) . '">Diff to PREV</a>';
}
$blame = new SVNBlame($repos, $relpath, $viewsvn->paths->fetch_rev_num());
echo '<table cellspacing="1" cellpadding="1" style="background-color: #EFEFEF; font: 11px monospace" width="100%">';
foreach ($blame->fetch() AS $entry)
{
echo '
<tr style="background-color: white">
<td>' . $entry['rev'] . '</td>
<td>' . $entry['author'] . '</td>
<td>' . str_replace(array(' ', "\t"), array(' ', ' '), htmlspecialchars($entry['line'])) . '</td>
</tr>';
}
echo '
</table>';
/*=====================================================================*\
|| ###################################################################
|| # $HeadURL$
|| # $Id$
|| ###################################################################
\*=====================================================================*/
?>