/*=====================================================================*\
|| ###################################################################
|| # ViewSVN [#]version[#]
-|| # Copyright ©2002-[#]year[#] Iris Studios, Inc.
+|| # Copyright ©2002-[#]year[#] Blue Static
|| #
|| # This program is free software; you can redistribute it and/or modify
|| # it under the terms of the GNU General Public License as published by
'blame'
);
+define('SVN', '$Id$');
+
require_once('./global.php');
-$navbar = $viewsvn->paths->construct_breadcrumb($viewsvn->paths->path, false);
+$navbar = ConstructNavbar();
// ###################################################################
-$link['log'] = $viewsvn->paths->out('log.php' . $viewsvn->paths->revstr, $viewsvn->paths->path);
-
-$show['head'] = ($viewsvn->svn->common->fetch_head_rev($viewsvn->paths->path) != $viewsvn->paths->revnum AND $viewsvn->paths->revnum != 'HEAD');
-if ($show['head'])
-{
- $link['gohead'] = $viewsvn->paths->out('blame.php' . $viewsvn->paths->fetch_rev_str(false, 'HEAD'), $viewsvn->paths->path);
- $link['diffhead'] = $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, 'HEAD', $viewsvn->paths->revnum), $viewsvn->paths->path);
-}
-
-$show['prev'] = (($prev = $viewsvn->svn->common->fetch_prev_rev($viewsvn->paths->path, $viewsvn->paths->revnum)) != -1 ? true : false);
-if ($show['prev'])
-{
- $link['diffprev'] = $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, $viewsvn->paths->revnum, $prev), $viewsvn->paths->path);
-}
-
-// ###################################################################
+$revision = new Revision($input->in['repos'], $input->in['rev'], $input->in['path']);
-$blame = new SVNBlame($viewsvn->paths->repos, $viewsvn->paths->relpath, $viewsvn->paths->revnum);
+$blame = BSXml::Parse($lib->run('blame --xml -r' . $revision->revision . ' ' . $lib->arg($repos->fetchPath($input->in['repos']) . $input->in['path']) . '@' . $revision->revision, true));
+$blame = $blame['blame']['target']['entry'];
+BSXml::UnifyNode($blame);
-$lines = '';
+$catdata = $lib->run('cat -r' . $revision->revision . ' ' . $lib->arg($repos->fetchPath($input->in['repos']) . $input->in['path']) . '@' . $revision->revision);
-foreach ($blame->fetch() AS $entry)
+foreach ($catdata AS $num => $line)
{
- $entry['view_link'] = $viewsvn->paths->out('view.php' . $viewsvn->paths->fetch_rev_str(false, $entry['rev']), $viewsvn->paths->path);
- $entry['line_clean'] = $viewsvn->svn->format($entry['line']);
+ $revision = $blame[$num]['commit']['revision'];
+ $author = $blame[$num]['commit']['author']['value'];
+ $view = ConstructLink('view', $input->in['repos'], $input->in['path'], $revision);
+ $line = FormatCode($line);
eval('$lines .= "' . $template->fetch('blame_line') . '";');
}