paths->construct_breadcrumb($viewsvn->paths->path, false);
// ###################################################################
$link['log'] = $viewsvn->paths->out('log.php' . $viewsvn->paths->revstr, $viewsvn->paths->path);
// ###################################################################
$revs = $viewsvn->paths->fetch_rev_num(true);
$high = $revs['high'];
$low = $revs['low'];
if ($high == 'HEAD')
{
$high = $viewsvn->svn->common->fetch_head_rev($viewsvn->paths->path);
}
if ($low == 0)
{
$low = $viewsvn->svn->common->fetch_prev_rev($viewsvn->paths->path, $high);
}
// ###################################################################
$show['fullchangeset'] = ($viewsvn->paths->is_root_path($viewsvn->paths->path) ? false : true);
if ($show['fullchangeset'])
{
$link['changeset'] = $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, $high, $low), $viewsvn->paths->repos . '/');
}
$log = $viewsvn->svn->common->fetch_log($viewsvn->paths->path, $high);
$log['message_clean'] = $viewsvn->svn->format_log_message($log['message']);
$files = $viewsvn->svn->common->construct_file_changes($log['files'], $viewsvn->paths->repos, $high);
// ###################################################################
$diff = new SVNDiff($viewsvn->paths->repos, $viewsvn->paths->relpath, $low, $high);
$isdir = (bool)$viewsvn->svn->common->isdir($viewsvn->paths->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 ? $viewsvn->paths->path . $filename : $viewsvn->paths->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$
|| ###################################################################
\*=====================================================================*/
?>