String srcURL = srcEntry.getURL();
String srcCFURL = srcEntry.getCopyFromURL();
long srcRevision = srcEntry.getRevision();
long srcCFRevision = srcEntry.getCopyFromRevision();
// copy props!
SVNVersionedProperties srcProps = srcParentArea.getProperties(src.getName());
SVNVersionedProperties dstProps = dstParentArea.getProperties(dst.getName());
srcProps.copyTo(dstProps);
File srcBaseFile = srcParentArea.getBaseFile(src.getName(), false);
File dstBaseFile = dstParentArea.getBaseFile(dst.getName(), false);
if (srcBaseFile.isFile()) {
SVNFileUtil.copy(srcBaseFile, dstBaseFile, false, false);
}
if (srcEntry.isScheduledForAddition() && srcEntry.isCopied()) {
dstEntry.scheduleForAddition();
dstEntry.setCopyFromRevision(srcCFRevision);
dstEntry.setCopyFromURL(srcCFURL);
dstEntry.setKind(SVNNodeKind.FILE);
dstEntry.setRevision(srcRevision);
dstEntry.setCopied(true);
} else if (!srcEntry.isCopied()
&& !srcEntry.isScheduledForAddition()) {
dstEntry.setCopied(true);
dstEntry.scheduleForAddition();
dstEntry.setKind(SVNNodeKind.FILE);
dstEntry.setCopyFromRevision(srcRevision);
dstEntry.setCopyFromURL(srcURL);
} else {
dstEntry.scheduleForAddition();
dstEntry.setKind(SVNNodeKind.FILE);
if (!dstEntry.isScheduledForReplacement()) {
dstEntry.setRevision(0);
}
}
SVNLog log = dstParentArea.getLog();
dstParentArea.saveEntries(false);
dstParentArea.saveVersionedProperties(log, true);
log.save();
dstParentArea.runLogs();
} else if (srcEntry.isDirectory()) {
SVNAdminArea srcArea = wcAccess.open(src, false, 0);
srcEntry = srcArea.getEntry(srcArea.getThisDirName(), false);
if (dstEntry == null) {
dstEntry = dstParentArea.addEntry(dst.getName());
}
SVNAdminArea dstArea = wcAccess.open(dst, true, SVNWCAccess.INFINITE_DEPTH);
SVNVersionedProperties srcProps = srcArea.getProperties(srcArea.getThisDirName());
SVNVersionedProperties dstProps = dstArea.getProperties(dstArea.getThisDirName());
SVNEntry dstParentEntry = dstParentArea.getEntry(dstParentArea.getThisDirName(), false);
String srcURL = srcEntry.getURL();
String srcCFURL = srcEntry.getCopyFromURL();
String dstURL = dstParentEntry.getURL();