String eolStyle = myEOLStyle != null ? myEOLStyle : (String) myFileProperties.get(SVNProperty.EOL_STYLE); byte[] eolBytes = SVNTranslator.getWorkingEOL(eolStyle);
byte[] eolBytes = null; if (SVNProperty.EOL_STYLE_NATIVE.equals(myFileProperties.get(SVNProperty.EOL_STYLE))) { eolBytes = SVNTranslator.getWorkingEOL(myEOLStyle != null ? myEOLStyle : (String) myFileProperties.get(SVNProperty.EOL_STYLE)); } else if (myFileProperties.containsKey(SVNProperty.EOL_STYLE)) { eolBytes = SVNTranslator.getWorkingEOL((String) myFileProperties.get(SVNProperty.EOL_STYLE)); }
    public void closeFile(String commitPath, String textChecksum) throws SVNException {        myDeltaProcessor.close();        if (textChecksum == null) {            textChecksum = (String) myFileProperties.get(SVNProperty.CHECKSUM);        }        if (myIsForce) {            myCurrentFile.delete();        }        String realChecksum = myChecksum != null ? myChecksum : SVNFileUtil.computeChecksum(myCurrentTmpFile);        myChecksum = null;        if (textChecksum != null                && !textChecksum.equals(realChecksum)) {            SVNErrorManager.error("svn: Checksum differs, expected '" + textChecksum + "'; actual: '" + realChecksum + "'");        }        // retranslate.        try {            String date = (String) myFileProperties                    .get(SVNProperty.COMMITTED_DATE);            String keywords = (String) myFileProperties                    .get(SVNProperty.KEYWORDS);            Map keywordsMap = null;            if (keywords != null) {                String url = SVNPathUtil.append(myURL, SVNEncodingUtil.uriEncode(myCurrentPath));                url = SVNPathUtil.append(url, SVNEncodingUtil.uriEncode(myCurrentFile.getName()));                String author = (String) myFileProperties                        .get(SVNProperty.LAST_AUTHOR);                String revStr = (String) myFileProperties                        .get(SVNProperty.COMMITTED_REVISION);                keywordsMap = SVNTranslator.computeKeywords(keywords, url,                        author, date, revStr);            }            String eolStyle = myEOLStyle != null ? myEOLStyle                    : (String) myFileProperties.get(SVNProperty.EOL_STYLE);            byte[] eolBytes = SVNTranslator.getWorkingEOL(eolStyle);            boolean special = myFileProperties.get(SVNProperty.SPECIAL) != null;            boolean executable = myFileProperties.get(SVNProperty.EXECUTABLE) != null;            SVNTranslator.translate(myCurrentTmpFile, myCurrentFile, eolBytes,                    keywordsMap, special, true);            if (executable) {                SVNFileUtil.setExecutable(myCurrentFile, true);            }            if (!special && date != null) {                myCurrentFile.setLastModified(SVNTimeUtil.parseDate(date)                        .getTime());            }            myEventDispatcher.handleEvent(SVNEventFactory                    .createExportAddedEvent(myRoot, myCurrentFile, SVNNodeKind.FILE),                    ISVNEventHandler.UNKNOWN);        } finally {            myCurrentTmpFile.delete();        }    }