editor.changeFileProperty(name, value);
editor.changeFileProperty(filePath, name, value);
    private boolean importFile(File rootFile, File file, SVNFileType fileType, String filePath, ISVNEditor editor) throws SVNException {        if (fileType == null || fileType == SVNFileType.UNKNOWN) {            SVNErrorManager.error("svn: unknown or unversionable type for '" + file + "'");        }        DebugLog.log("importing file: " + file + " to " + filePath);        editor.addFile(filePath, null, -1);        String mimeType = null;        Map autoProperties = new HashMap();        if (fileType != SVNFileType.SYMLINK) {            autoProperties = getOptions().getAutoProperties(file.getName(), autoProperties);            if (!autoProperties.containsKey(SVNProperty.MIME_TYPE)) {                mimeType = SVNFileUtil.detectMimeType(file);                if (mimeType != null) {                    autoProperties.put(SVNProperty.MIME_TYPE, mimeType);                }            }            if (!autoProperties.containsKey(SVNProperty.EXECUTABLE) && SVNFileUtil.isExecutable(file)) {                autoProperties.put(SVNProperty.EXECUTABLE, "");            }        } else {            autoProperties.put(SVNProperty.SPECIAL, "*");        }        for (Iterator names = autoProperties.keySet().iterator(); names.hasNext();) {            String name = (String) names.next();            String value = (String) autoProperties.get(name);            editor.changeFileProperty(name, value);        }        // send "adding"        SVNEvent addedEvent = SVNEventFactory.createCommitEvent(rootFile, file, SVNEventAction.COMMIT_ADDED, SVNNodeKind.FILE, mimeType);        svnEvent(addedEvent, ISVNEventListener.UNKNOWN);        editor.applyTextDelta(null);        // translate and send file.        String eolStyle = (String) autoProperties.get(SVNProperty.EOL_STYLE);        String keywords = (String) autoProperties.get(SVNProperty.KEYWORDS);        boolean special = autoProperties.get(SVNProperty.SPECIAL) != null;        File tmpFile = null;        if (eolStyle != null || keywords != null || special) {            byte[] eolBytes = eolStyle != null ? SVNTranslator.LF : null;            Map keywordsMap = keywords != null ? SVNTranslator.computeKeywords(keywords, null, null, null, null) : null;            tmpFile = SVNFileUtil.createUniqueFile(file.getParentFile(), file.getName(), ".tmp");            SVNTranslator.translate(file, tmpFile, eolBytes, keywordsMap, special, false);        }        File importedFile = tmpFile != null ? tmpFile : file;        String checksum = SVNFileUtil.computeChecksum(importedFile);        OutputStream os = editor.textDeltaChunk(SVNDiffWindowBuilder.createReplacementDiffWindow(importedFile.length()));        InputStream is = SVNFileUtil.openFileForReading(importedFile);        int r;        try {            while((r = is.read()) >= 0) {                os.write(r);            }        } catch (IOException e) {            SVNErrorManager.error("svn: IO error while importing file '" + file + "': " + e.getMessage());        } finally {            try {                os.close();            } catch (IOException e) {                SVNErrorManager.error("svn: IO error while importing file '" + file + "': " + e.getMessage());            }            if (tmpFile != null) {                tmpFile.delete();            }        }        editor.textDeltaEnd();        editor.closeFile(checksum);        return true;    }