/*=====================================================================*\
|| ###################################################################
|| # 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 = $controller->construct_breadcrumb();
+$navbar = ConstructNavbar();
// ###################################################################
-$latest = $controller->cachev->fetch_node();
-
-$link['log'] = $controller->href_compound('log.php');
-
-$show['head'] = ($latest['revision'] != $controller->revctx);
-if ($show['head'])
-{
- $link['gohead'] = $controller->href_compound('blame.php', null, Paths::fetch_rev_str(false, 'HEAD'));
- $link['diffhead'] = $controller->href_compound('diff.php', null, Paths::fetch_rev_str(true, 'HEAD', $contoller->revctx));
-}
-
-$show['prev'] = ($prev = $controller->cachev->fetch_prev_revision($controller->revctx));
-if ($show['prev'])
-{
- $link['diffprev'] = $controller->href_compound('diff.php', null, Paths::fetch_rev_str(true, $controller->revctx, $prev));
-}
-
-// ###################################################################
+$revision = new Revision($input->in['repos'], $input->in['rev'], $input->in['path']);
-$blame = new SVNBlame($controller);
+$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'] = $controller->href_compound('view.php', null, Paths::fetch_rev_str(false, $entry['rev']));
- $entry['line_clean'] = SVNCommon::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') . '";');
}