use of org.tmatesoft.svn.core.wc.SVNCopySource in project intellij-community by JetBrains.
the class SvnKitCopyMoveClient method copy.
@Override
public long copy(@NotNull SvnTarget source, @NotNull SvnTarget destination, @Nullable SVNRevision revision, boolean makeParents, boolean isMove, @NotNull String message, @Nullable CommitEventHandler handler) throws VcsException {
if (!destination.isURL()) {
throw new IllegalArgumentException("Only urls are supported as destination " + destination);
}
final SVNCopySource copySource = createCopySource(source, revision);
SVNCopyClient client = myVcs.getSvnKitManager().createCopyClient();
client.setEventHandler(toEventHandler(handler));
SVNCommitInfo info;
try {
info = client.doCopy(new SVNCopySource[] { copySource }, destination.getURL(), isMove, makeParents, true, message, null);
} catch (SVNException e) {
throw new VcsException(e);
}
return info != null ? info.getNewRevision() : INVALID_REVISION;
}
use of org.tmatesoft.svn.core.wc.SVNCopySource in project Gargoyle by callakrsos.
the class SVNCopy method copy.
public void copy(SVNURL targetURL, SVNURL[] paths) throws SVNException {
SVNCopySource[] convert = convert(paths);
/*
doCopy( SVNCopySource[] sources,
SVNURL dst,
boolean isMove,
boolean makeParents,
boolean failWhenDstExists,
java.lang.String commitMessage,
SVNProperties revisionProperties )
Copies each source in sources to dst.
*/
SVNCopyClient copyClient = getSvnManager().getCopyClient();
copyClient.doCopy(convert, targetURL, false, false, false, "copy by O-PERA", new SVNProperties());
}
Aggregations