[ create a new paste ] login | about

Link: http://codepad.org/Kb2K8e6m    [ raw code | fork ]

PHP, pasted on Aug 8:
<?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();

?>


Create a new paste based on this one


Comments: