Bugitor / pyrustest.php

<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en">
		<meta charset="utf-8" />
		<link rel="stylesheet" type="text/css" href="/testassets/chaw.css" />
        <script type="text/javascript" src="/testassets/jquery.min.js"></script>
        <script type="text/javascript" src="/testassets/jquery.highlight_diff.min.js"></script>
        <title>Pyrus SVN test</title>
		<!--[if lt IE 9]>
		<script src=""></script>
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<link rel="stylesheet" type="text/css" href="/themes/new/css/screen.css" />
		<!-- Favicons
		================================================== -->
		<link rel="shortcut icon" href="/themes/new/images/favicon.ico">
		<link rel="apple-touch-icon" href="/themes/new/images/apple-touch-icon.png">
		<link rel="apple-touch-icon" sizes="72x72" href="/themes/new/images/apple-touch-icon-72x72.png">
		<link rel="apple-touch-icon" sizes="114x114" href="/themes/new/images/apple-touch-icon-114x114.png">
$path = 'protected/vendors/pyrus/vendor/php';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);

require_once 'protected/vendors/pyrus/vendor/php/VersionControl/SVN.php';

// Setup error handling -- always a good idea!
$svnstack = &PEAR_ErrorStack::singleton('VersionControl_SVN');

// Set up runtime options.
$options = array('fetchmode' => VERSIONCONTROL_SVN_FETCHMODE_ASSOC);
// Request log class from factory
$svn = VersionControl_SVN::factory('log', $options);

// Define any switches and aguments we may need
$switches = array('verbose' => 'true');
$args = array('');

// Run command
if ($output = $svn->run($args, $switches)) {
    echo "<pre>";
    echo "</pre>";
} else {
    if (count($errs = $svnstack->getErrors())) {
        foreach ($errs as $err) {
            echo '<br />'.$err['message']."<br />\n";
            echo "Command used: " . $err['params']['cmd'];

$options = array('fetchmode' => VERSIONCONTROL_SVN_FETCHMODE_RAW);

$switches = array('r' => '113:131');

$args = array('');

$svn = VersionControl_SVN::factory(array('diff'), $options);

if ($diffs = $svn->diff->run($args, $switches)) {
echo "<pre>$diffs</pre>";
$diffs = implode("\n", array_slice(explode("\n", $diffs), 2));
echo "<div class=diff>";
echo "diff --git\n";
echo htmlspecialchars($diffs);
echo "</div>";
} else {
    if (count($errs = $svnstack->getErrors())) {
        foreach ($errs as $err) {
            echo '<br />'.$err['message']."<br />\n";
            echo "Command used: " . $err['params']['cmd'];

	<script type="text/javascript">
jQuery(function($) {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.