SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.CL_UNNECESSARY_LOG_MESSAGE,
"Local, non-commit operations do not take a log message or revision properties"), SVNLogType.CLIENT);
}
}
SVNCopyClient client = getSVNEnvironment().getClientManager().getCopyClient();
if (!getSVNEnvironment().isQuiet()) {
client.setEventHandler(new SVNNotifyPrinter(getSVNEnvironment()));
}
client.setCommitHandler(getSVNEnvironment());
Collection sources = new ArrayList();
for (Iterator ts = targets.iterator(); ts.hasNext();) {
String targetName = (String) ts.next();
SVNPath source = new SVNPath(targetName);
if (source.isURL()) {
sources.add(new SVNCopySource(SVNRevision.HEAD, SVNRevision.UNDEFINED, source.getURL()));
} else {
sources.add(new SVNCopySource(getSVNEnvironment().getStartRevision(), SVNRevision.UNDEFINED, source.getFile()));
}
}
SVNCopySource[] copySources = (SVNCopySource[]) sources.toArray(new SVNCopySource[sources.size()]);
try {
if (dst.isURL()) {
SVNCommitInfo info = client.doCopy(copySources, dst.getURL(), true, getSVNEnvironment().isParents(),
false, getSVNEnvironment().getMessage(), getSVNEnvironment().getRevisionProperties());
if (!getSVNEnvironment().isQuiet()) {
getSVNEnvironment().printCommitInfo(info);
}
} else {
client.doCopy(copySources, dst.getFile(), true, getSVNEnvironment().isParents(), false);
}
} catch (SVNException e) {
SVNErrorMessage err = e.getErrorMessage();
SVNErrorCode code = err.getErrorCode();
if (code == SVNErrorCode.UNVERSIONED_RESOURCE || code == SVNErrorCode.CLIENT_MODIFIED) {