<?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/ # ||
-|| ################################################################### ||
+|| # 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
+|| # the Free Software Foundation; version [#]gpl[#] of the License.
+|| #
+|| # This program is distributed in the hope that it will be useful, but
+|| # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+|| # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+|| # more details.
+|| #
+|| # You should have received a copy of the GNU General Public License along
+|| # with this program; if not, write to the Free Software Foundation, Inc.,
+|| # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+|| ###################################################################
\*=====================================================================*/
+$fetchtemplates = array(
+ 'blame_line',
+ 'blame'
+);
+
+define('SVN', '$Id$');
+
require_once('./global.php');
-$path = $viewsvn->paths->parse();
-$repos = $viewsvn->paths->fetch_repos($path);
-$relpath = $viewsvn->paths->fetch_path($path);
+$navbar = ConstructNavbar();
+
+// ###################################################################
-echo $viewsvn->paths->construct_breadcrumb($path, false);
+$revision = new Revision($input->in['repos'], $input->in['rev'], $input->in['path']);
-$blame = new SVNBlame($repos, $relpath, @$viewsvn->in['rev']);
+$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);
-echo '<table cellspacing="1" cellpadding="1" style="background-color: #EFEFEF" width="100%">';
+$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)
{
- 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>';
+ $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') . '";');
}
-echo '
-</table>';
+// ###################################################################
+
+eval('$template->flush("' . $template->fetch('blame') . '");');
/*=====================================================================*\
|| ###################################################################