//change file contents of A_copy/B/lambda and A_copy/mu
SamplesUtility.writeToFile(new File(wcRoot, "A_copy/B/lambda"), "New text in copied 'lambda'", true);
SamplesUtility.writeToFile(new File(wcRoot, "A_copy/mu"), "New text in copied 'mu'", false);
//now diff the base revision of the working copy against the repository
SVNDiffClient diffClient = clientManager.getDiffClient();
/*
* Since we provided no custom ISVNOptions implementation to SVNClientManager, our
* manager uses DefaultSVNOptions, which is set to all SVN*Client classes which the
* manager produces. So, we can cast ISVNOptions to DefaultSVNOptions.
*/
DefaultSVNOptions options = (DefaultSVNOptions) diffClient.getOptions();
//This way we set a conflict handler which will automatically resolve conflicts for those
//cases that we would like
options.setConflictHandler(new ConflictResolverHandler());
/* do the same merge call, merge-tracking feature will merge only those revisions
* which were not still merged.
*/
SVNRevisionRange rangeToMerge = new SVNRevisionRange(SVNRevision.create(1), SVNRevision.HEAD);
diffClient.doMerge(A_URL, SVNRevision.HEAD, Collections.singleton(rangeToMerge),
new File(wcRoot, "A_copy"), SVNDepth.UNKNOWN, true, false, false, false);
} catch (SVNException svne) {
System.out.println(svne.getErrorMessage());
System.exit(1);