public void makeCopy(FSRevisionRoot fromRoot, String fromPath, String toPath, boolean preserveHistory) throws SVNException {
String txnId = myTxnRoot.getTxnID();
FSRevisionNode fromNode = fromRoot.getRevisionNode(fromPath);
FSParentPath toParentPath = myTxnRoot.openPath(toPath, false, true);
if ((myTxnRoot.getTxnFlags() & FSTransactionRoot.SVN_FS_TXN_CHECK_LOCKS) != 0) {
FSCommitter.allowLockedOperation(myFSFS, toPath, myAuthor, myLockTokens, true, false);
}
if (toParentPath.getRevNode() != null && toParentPath.getRevNode().getId().equals(fromNode.getId())) {
return;
}
FSPathChangeKind changeKind;
if (toParentPath.getRevNode() != null) {
changeKind = FSPathChangeKind.FS_PATH_CHANGE_REPLACE;
} else {
changeKind = FSPathChangeKind.FS_PATH_CHANGE_ADD;
}
makePathMutable(toParentPath.getParent(), toPath);
String fromCanonPath = fromPath;
copy(toParentPath.getParent().getRevNode(), toParentPath.getNameEntry(), fromNode, preserveHistory, fromRoot.getRevision(), fromCanonPath, txnId);
if (changeKind == FSPathChangeKind.FS_PATH_CHANGE_REPLACE) {
myTxnRoot.removeRevNodeFromCache(toParentPath.getAbsPath());
}
FSRevisionNode newNode = myTxnRoot.getRevisionNode(toPath);
addChange(toPath, newNode.getId(), changeKind, false, false, fromRoot.getRevision(), fromCanonPath);
}