public static InputStream recordMerge ( File directory , String branchName , long ... revisions ) throws IOException { // svn merge -c 3328 --record-only ^/calc/trunk CommandLine cmdLine = new CommandLine ( SVN_CMD ) ; cmdLine . addArgument ( CMD_MERGE ) ; addDefaultArguments ( cmdLine , null , null ) ; cmdLine . addArgument ( "--record-only" ) ; cmdLine . addArgument ( "-c" ) ; StringBuilder revs = new StringBuilder ( ) ; for ( long revision : revisions ) { revs . append ( revision ) . append ( "," ) ; } cmdLine . addArgument ( revs . toString ( ) ) ; // leads to "non-inheritable merges" // cmdLine.addArgument("--depth"); // cmdLine.addArgument("empty"); cmdLine . addArgument ( "^" + branchName ) ; //cmdLine.addArgument("."); // current dir return ExecutionHelper . getCommandResult ( cmdLine , directory , 0 , 120000 ) ; }
Record a manual merge from one branch to the local working directory .