[MNG-2229] adding patch which adds svn checkout capabilities

Submitted by: Jesse McConnell


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@394429 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2006-04-16 03:43:08 +00:00
parent 0875be5a95
commit a5a6226e53
1 changed files with 38 additions and 1 deletions

View File

@ -370,7 +370,7 @@ public class Verifier
}
}
private static void executeCommand( String line )
private void executeCommand( String line )
throws VerificationException
{
int index = line.indexOf( " " );
@ -416,6 +416,43 @@ public class Verifier
throw new VerificationException( "Error removing directory - delete failed" );
}
}
else if ( "svn".equals( cmd ) )
{
try
{
Commandline cli = new Commandline( line );
cli.setWorkingDirectory( basedir );
Writer logWriter = new FileWriter( new File( basedir, LOG_FILENAME ) );
StreamConsumer out = new WriterStreamConsumer( logWriter );
StreamConsumer err = new WriterStreamConsumer( logWriter );
System.out.println( "Command: " + Commandline.toString( cli.getCommandline() ) );
int ret = CommandLineUtils.executeCommandLine( cli, out, err );
logWriter.close();
if ( ret > 0 )
{
System.err.println( "Exit code: " + ret );
throw new VerificationException();
}
}
catch ( CommandLineException e )
{
throw new VerificationException( e );
}
catch ( IOException e )
{
throw new VerificationException( e );
}
}
else
{
throw new VerificationException( "unknown command: " + cmd );