paths->construct_breadcrumb($path, false);
// ###################################################################
$link['log'] = $viewsvn->paths->out('log.php' . $viewsvn->paths->fetch_rev_str(), $path);
// ###################################################################
$revs = $viewsvn->paths->fetch_rev_num(true);
$high = $revs['high'];
$low = $revs['low'];
if ($high == 'HEAD')
{
$high = $viewsvn->svn->common->fetch_head_rev($path);
}
if ($low == 0)
{
$low = $viewsvn->svn->common->fetch_prev_rev($path, $high);
}
// ###################################################################
$show['fullchangeset'] = ($viewsvn->paths->is_root_path($path) ? false : true);
if ($show['fullchangeset'])
{
$link['changeset'] = $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, $high, $low), $repos . '/');
}
$log = $viewsvn->svn->common->fetch_log($path, $high);
$log['message_clean'] = $viewsvn->svn->format_log_message($log['message']);
$files = $viewsvn->svn->common->construct_file_changes($log['files'], $repos, $high);
// ###################################################################
$diff = new SVNDiff($repos, $relpath, $low, $high);
$isdir = (bool)$viewsvn->svn->common->isdir($path);
$changes = '';
foreach ($diff->fetch() AS $filename => $file)
{
$hunktpl = '';
$proplist = '';
if (!$filename)
{
continue;
}
$props = $file['props'];
$show['props'] = (bool)$props;
unset($file['props']);
foreach ($file AS $hunk)
{
$lines = '';
foreach ($hunk AS $key => $line)
{
$show['hunk'] = false;
if ($key == 'hunk' AND isset($line['old']))
{
$filepath = ($isdir ? $path . $filename : $path);
$rlow = $viewsvn->paths->out('view.php' . $viewsvn->paths->fetch_rev_str(false, $low), $filepath);
$rhigh = $viewsvn->paths->out('view.php' . $viewsvn->paths->fetch_rev_str(false, $high), $filepath);
$show['hunk'] = true;
}
else
{
if ($line['act'] == '+')
{
$class = 'diff_add';
}
else if ($line['act'] == '-')
{
$class = 'diff_del';
}
else
{
$class = 'diff_norm';
}
$line['line_clean'] = $viewsvn->svn->format($line['line']);
}
eval('$lines .= "' . $template->fetch('diff_line') . '";');
}
eval('$hunktpl .= "' . $template->fetch('diff_hunk') . '";');
}
foreach ($props AS $name => $values)
{
// modified
if (isset($values['add']) AND isset($values['del']))
{
$data = sprintf($lang->string('Property %1$s changed from %2$s to %3$s'), $name, $values['del'], $values['add']);
}
// added
else if (isset($values['add']))
{
$data = sprintf($lang->string('Property %1$s set to %2$s'), $name, $values['add']);
}
// removed
else if (isset($values['del']))
{
$data = sprintf($lang->string('Property %1$s deleted'), $name);
}
eval('$proplist .= "' . $template->fetch('property') . '";');
}
eval('$changes .= "' . $template->fetch('diff_file') . '";');
}
// ###################################################################
//echo('$template->flush("' . $template->fetch('diff') . '");');
eval('$template->flush("' . $template->fetch('diff') . '");');
/*=====================================================================*\
|| ###################################################################
|| # $HeadURL$
|| # $Id$
|| ###################################################################
\*=====================================================================*/
?>