private void copyVersionedFile(File dstPath, SVNDirectory dir, String fileName, SVNRevision revision, boolean force, String eol) throws SVNException {
private void copyVersionedFile(File dstPath, SVNDirectory dir, String fileName, SVNRevision revision, String eol) throws SVNException {
    private void copyVersionedFile(File dstPath, SVNDirectory dir, String fileName, SVNRevision revision, boolean force, String eol) throws SVNException {        SVNEntries entries = dir.getEntries();        SVNEntry entry = entries.getEntry(fileName, false);        if (entry == null) {            SVNErrorManager.error("svn: '" + dir.getFile(fileName) + "' is not under version control or doesn't exist");        }        if (revision == SVNRevision.WORKING && entry.isScheduledForDeletion()) {            return;        }        if (revision != SVNRevision.WORKING && entry.isScheduledForAddition()) {            return;        }        boolean modified = false;        SVNProperties props = null;        long timestamp;        if (revision != SVNRevision.WORKING) {            props = dir.getBaseProperties(fileName, false);        } else {            props = dir.getProperties(fileName, false);            modified = dir.hasTextModifications(fileName, false);        }        boolean special = props.getPropertyValue(SVNProperty.SPECIAL) != null;        boolean executable = props.getPropertyValue(SVNProperty.EXECUTABLE) != null;        String keywords = props.getPropertyValue(SVNProperty.KEYWORDS);        byte[] eols = eol != null ? SVNTranslator.getEOL(eol) : null;        if (eols == null) {            eol = props.getPropertyValue(SVNProperty.EOL_STYLE);            eols = SVNTranslator.getWorkingEOL(eol);        }        if (modified && !special) {            timestamp = dir.getFile(fileName).lastModified();        } else {            timestamp = SVNTimeUtil.parseDateAsLong(entry.getCommittedDate());        }        Map keywordsMap = null;        if (keywords != null) {            String rev = Long.toString(entry.getCommittedRevision());            String author;            if (modified) {                author = "(local)";                rev += "M";            } else {                author = entry.getAuthor();                            }            keywordsMap = SVNTranslator.computeKeywords(keywords, entry.getURL(), author, entry.getCommittedDate(), rev);                    }        File srcFile = revision == SVNRevision.WORKING ? dir.getFile(fileName) : dir.getBaseFile(fileName, false);        SVNFileType fileType = SVNFileType.getType(srcFile);        if (fileType == SVNFileType.SYMLINK && revision == SVNRevision.WORKING) {            // base will be translated OK, but working not.            File tmpBaseFile = dir.getBaseFile(fileName, true);            try {                SVNTranslator.translate(srcFile, tmpBaseFile, eols, keywordsMap, special, false);                SVNTranslator.translate(tmpBaseFile, dstPath, eols, keywordsMap, special, true);            } finally {                tmpBaseFile.delete();            }        } else {            SVNTranslator.translate(srcFile, dstPath, eols, keywordsMap, special, true);        }        if (executable) {            SVNFileUtil.setExecutable(dstPath, true);        }        if (!special && timestamp > 0) {            dstPath.setLastModified(timestamp);        }    }