/*=====================================================================*\
|| ###################################################################
|| # 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
$fetchtemplates = array(
'browse_node',
- 'browse'
+ 'browse',
+ 'property'
);
+define('SVN', '$Id$');
+
require_once('./global.php');
-$navbar = $viewsvn->paths->construct_breadcrumb($path);
+$navbar = ConstructNavbar();
// ###################################################################
-$link['log'] = $viewsvn->paths->out('log.php' . $viewsvn->paths->fetch_rev_str(), $path);
-
-$show['head'] = ($viewsvn->svn->common->fetch_head_rev($path) != $viewsvn->paths->fetch_rev_num() AND $viewsvn->paths->fetch_rev_num() != 'HEAD');
-if ($show['head'])
+$revision = $headRev = new Revision($input->in['repos'], $input->in['rev'], $input->in['path']);
+if ($input->in['rev'])
{
- $link['gohead'] = $viewsvn->paths->out('browse.php' . $viewsvn->paths->fetch_rev_str(false, 'HEAD'), $path);
- $link['diffhead'] = $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, 'HEAD', $viewsvn->paths->fetch_rev_num()), $path);
+ $headRev = new Revision($input->in['repos'], 0, $input->in['path']);
+ if ($headRev->revision != $revision->revision)
+ {
+ $show['head'] = true;
+ $link['gohead'] = ConstructLink('browse', $input->in['repos'], $input->in['path'], 0);
+ }
}
-$show['prev'] = (($prev = $viewsvn->svn->common->fetch_prev_rev($path, $viewsvn->paths->fetch_rev_num())) != -1 ? true : false);
-if ($show['prev'])
+if ($revision->revision - 1 > 0)
{
- $link['diffprev'] = $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, $viewsvn->paths->fetch_rev_num(), $prev), $path);
+ $show['diff'] = true;
+ $link['diff'] = ConstructLink('diff', $input->in['repos'], $input->in['path'], $revision->revision);
}
// ###################################################################
-// #*# finish extracting this tpl
-$revinfo = $viewsvn->svn->common->fetch_log($path, $viewsvn->paths->fetch_rev_num());
+$props = $revision->getPropsForPath($input->in['path']);
+$show['props'] = (sizeof($props) > 0);
+$proplist = FormatPropList($props);
-$listing = $viewsvn->svn->ls($repos, $relpath, $viewsvn->paths->fetch_rev_num());
+// ###################################################################
-$nodes = '';
+$revision->getRevisionInfo();
+
+$listing = BSXml::Parse($lib->run('ls --xml -r' . $revision->revision . ' ' . $lib->arg($repos->fetchPath($input->in['repos']) . $input->in['path']) . '@' . $revision->revision, true));
-foreach ($listing AS $item)
+BSXml::UnifyNode($listing['lists']['list']['entry']);
+$nodes = '';
+foreach ($listing['lists']['list']['entry'] AS $item)
{
- if ($item{ strlen($item) - 1 } == '/')
- {
- $show['directory'] = true;
- $browse = $viewsvn->paths->out('browse.php' . $viewsvn->paths->fetch_rev_str(), $path . $item);
- }
- else
- {
- $show['directory'] = false;
- $view = $viewsvn->paths->out('view.php' . $viewsvn->paths->fetch_rev_str(), $path . $item);
- $blame = $viewsvn->paths->out('blame.php' . $viewsvn->paths->fetch_rev_str(), $path . $item);
- }
-
- $log = $viewsvn->paths->out('log.php' . $viewsvn->paths->fetch_rev_str(), $path . $item);
-
+ $isDir = ($item['kind'] == 'dir');
+ $item = $item['name']['value'];
+ $itemLink = ConstructLink(($isDir ? 'browse' : 'view'), $input->in['repos'], $input->in['path'] . '/' . $item, $input->in['rev']);
eval('$nodes .= "' . $template->fetch('browse_node') . '";');
}
// ###################################################################
+$link['log'] = ConstructLink('log', $input->in['repos'], $input->in['path'], $input->in['rev']);
+
eval('$template->flush("' . $template->fetch('browse') . '");');
/*=====================================================================*\