<?php
# Location of this file is in 'C:\data\my-site.lv\svn.php'
function updatesvn() {
if ( isset( $_GET['revision'] ) ) {
# Get version number to move to
$version = $_GET['revision']*1;
# Command to svn update
$cmd = "svn --non-interactive update -r $version";
# Execute the command and check for output
exec( $cmd." 2>&1", $out, $ret );
if ( $ret ) {
echo "There was a problem!<br />";
} else {
echo "Everything went better than expected!<br />";
}
print_r( $out );
}
}
updatesvn();
?>