//now make some changes to the A tree
SamplesUtility.writeToFile(new File(wcRoot, "iota"), "New text appended to 'iota'", true);
SamplesUtility.writeToFile(new File(wcRoot, "A/mu"), "New text in 'mu'", false);
SVNWCClient wcClient = SVNClientManager.newInstance().getWCClient();
wcClient.doSetProperty(new File(wcRoot, "A/B"), "spam", SVNPropertyValue.create("egg"), false,
SVNDepth.EMPTY, null, null);
//commit local changes
SVNCommitClient commitClient = clientManager.getCommitClient();
commitClient.doCommit(new File[] { wcRoot }, false, "committing changes", null, null, false, false, SVNDepth.INFINITY);
//now diff the base revision of the working copy against the repository
SVNDiffClient diffClient = clientManager.getDiffClient();
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);
//now make some changes to the A tree again
//change file contents of iota and A/D/gamma
SamplesUtility.writeToFile(new File(wcRoot, "iota"), "New text2 appended to 'iota'", true);
SamplesUtility.writeToFile(new File(wcRoot, "A/D/gamma"), "New text in 'gamma'", false);
//remove A/C from version control
wcClient.doDelete(new File(wcRoot, "A/C"), false, true, false);
//commit local changes
commitClient.doCommit(new File[] { wcRoot }, false, "committing changes again", null, null, false, false, SVNDepth.INFINITY);
/* do the same merge call, merge-tracking feature will merge only those revisions