DebugLog.log("source is executable: " + executable);
    private void copyFile(SVNWCAccess dstAccess, SVNWCAccess srcAccess,            String dstName) throws SVNException {        SVNEntry dstEntry = dstAccess.getAnchor().getEntries().getEntry(                dstName, false);        File dstPath = new File(dstAccess.getAnchor().getRoot(), dstName);        File srcPath = new File(srcAccess.getAnchor().getRoot(), srcAccess                .getTargetName());        if (dstEntry != null && dstEntry.isFile()) {            if (dstEntry.isScheduledForDeletion()) {                SVNErrorManager                        .error("svn: '"                                + dstPath                                + "' is scheduled for deletion; it must be committed before being overwritten");            } else {                SVNErrorManager.error("svn: There is already versioned item '"                        + dstPath + "'");            }        }        SVNEntry srcEntry = srcAccess.getAnchor().getEntries().getEntry(                srcAccess.getTargetName(), true);        if (srcEntry == null) {            SVNErrorManager.error("svn: Cannot copy or move '" + srcPath                    + "': it's not under version control");        } else if (srcEntry.isScheduledForAddition()                || srcEntry.getURL() == null || srcEntry.isCopied()) {            SVNErrorManager.error("svn: Cannot copy or move '" + srcPath                    + "': it's not in repository yet; try committing first");        }        SVNFileType srcType = SVNFileType.getType(srcPath);        if (srcType == SVNFileType.SYMLINK) {            String name = SVNFileUtil.getSymlinkName(srcPath);            if (name != null) {                SVNFileUtil.createSymlink(dstPath, name);            }        } else {            SVNFileUtil.copyFile(srcPath, dstPath, false);        }        // copy props, props base and text-base        File srcTextBase = srcAccess.getAnchor().getBaseFile(                srcAccess.getTargetName(), false);        SVNProperties srcProps = srcAccess.getAnchor().getProperties(                srcAccess.getTargetName(), false);        boolean executable = srcProps.getPropertyValue(SVNProperty.EXECUTABLE) != null;        DebugLog.log("source is executable: " + executable);        SVNProperties srcBaseProps = srcAccess.getAnchor().getBaseProperties(                srcAccess.getTargetName(), false);        File dstTextBase = dstAccess.getAnchor().getBaseFile(dstName, false);        SVNProperties dstProps = dstAccess.getAnchor().getProperties(dstName,                false);        SVNProperties dstBaseProps = srcAccess.getAnchor().getBaseProperties(                dstName, false);        if (srcTextBase.exists()) {            SVNFileUtil.copyFile(srcTextBase, dstTextBase, false);        }        if (srcProps.getFile().exists()) {            srcProps.copyTo(dstProps);        }        if (srcBaseProps.getFile().exists()) {            srcBaseProps.copyTo(dstBaseProps);        }        if (executable) {            SVNFileUtil.setExecutable(dstPath, true);        }        // and finally -> add.        String copyFromURL = srcAccess.getTargetEntryProperty(SVNProperty.URL);        long copyFromRevision = SVNRevision.parse(                srcAccess.getTargetEntryProperty(SVNProperty.REVISION))                .getNumber();        SVNEntry entry = dstAccess.getAnchor().add(dstName, false, false);        entry.setCopied(true);        entry.setCopyFromRevision(copyFromRevision);        entry.setCopyFromURL(copyFromURL);        entry.setRevision(copyFromRevision);        entry.scheduleForAddition();        dstAccess.getAnchor().getEntries().save(true);    }