Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>That's not that difficult. If you wanted to retain copy history, you could run the following code</p> <pre><code>ISVNCommitEditor editor = svnRepository.getCommitEditor("", null); editor.openRoot(latestRevision); editor.openDir("path", latestRevision); //or use addDir if it doesn't exist editor.openDir("path/to", latestRevision); //or use addDir if it doesn't exist editor.openDir("path/to/new", latestRevision); //or use addDir if it doesn't exist editor.addDir("path/to/new/directory", "/path/to/old/directory", copySourceRevision); editor.closeDir(); editor.closeDir(); editor.closeDir(); editor.closeDir(); editor.closeDir(); editor.closeEdit(); </code></pre> <p>But if you don't want to retain the history, you can create editor with</p> <pre><code>ISVNCommitEditor editor = svnRepository.getCommitEditor("", null); </code></pre> <p>and then call</p> <pre><code>anotherSvnRepository.setLocation(copySourceUrl, true); anotherSvnRepository.update(copySourceRevision, "", SVNDepth.INFINITY, false, reporter, customEditor); </code></pre> <p>Instead of <code>reporter</code> use this code:</p> <pre><code> ISVNReporterBaton reporter = new ISVNReporterBaton() { @Override public void report(ISVNReporter reporter) throws SVNException { reporter.setPath("", null, copySourceRevision, SVNDepth.INFINITY, true); reporter.finishReport(); } }; </code></pre> <p><code>customEditor</code> should be a wrapper for <code>editor</code> constructed above, that would call <code>editor</code> with correct paths (maybe you should add some openDir/closeDir calls to make editor calls correct).</p> <p>As an example, you can have a look at the sources of my <a href="http://sourceforge.net/projects/svnkitfilter/" rel="nofollow">svnkitfilter</a> project that does similar things.</p> <p>To understand if the directory/file exists or not use SVNRepository#checkPath method.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload