public static InputStream checkout ( String url , File directory , String user , String pwd ) throws IOException { if ( ! directory . exists ( ) && ! directory . mkdirs ( ) ) { throw new IOException ( "Could not create new working copy directory at " + directory ) ; } CommandLine cmdLine = new CommandLine ( SVN_CMD ) ; cmdLine . addArgument ( "co" ) ; addDefaultArguments ( cmdLine , user , pwd ) ; cmdLine . addArgument ( url ) ; cmdLine . addArgument ( directory . toString ( ) ) ; // allow up to two hour for new checkouts return ExecutionHelper . getCommandResult ( cmdLine , directory , - 1 , 2 * 60 * 60 * 1000 ) ; }
Performs a SVN Checkout of the given URL to the given directory