public static InputStream getRemoteFileContent ( String file , long revision , String baseUrl , String user , String pwd ) throws IOException { // svn cat -r 666 file CommandLine cmdLine = new CommandLine ( SVN_CMD ) ; cmdLine . addArgument ( CMD_CAT ) ; addDefaultArguments ( cmdLine , user , pwd ) ; cmdLine . addArgument ( "-r" ) ; cmdLine . addArgument ( Long . toString ( revision ) ) ; cmdLine . addArgument ( baseUrl + file ) ; return ExecutionHelper . getCommandResult ( cmdLine , new File ( "." ) , 0 , 120000 ) ; }
Retrieve the contents of a file from the web - interface of the SVN server .