baseProps.setModified(false);
    public void saveVersionedProperties(ISVNLog log, boolean close) throws SVNException {        Map command = new HashMap();        Map processedEntries = new TreeMap();                Map propsCache = getPropertiesStorage(false);        if (propsCache != null && !propsCache.isEmpty()) {            for(Iterator entries = propsCache.keySet().iterator(); entries.hasNext();) {                String name = (String)entries.next();                ISVNProperties props = (ISVNProperties)propsCache.get(name);                if (props.isModified()) {                    ISVNProperties baseProps = getBaseProperties(name);                    ISVNProperties propsDiff = baseProps.compareTo(props);                    String[] cachableProps = SVNAdminArea14.getCachableProperties();                    command.put(SVNProperty.CACHABLE_PROPS, asString(cachableProps, " "));                    Map propsMap = props.loadProperties();                    LinkedList presentProps = new LinkedList();                    for (int i = 0; i < cachableProps.length; i++) {                        if (propsMap.containsKey(cachableProps[i])) {                            presentProps.addLast(cachableProps[i]);                        }                    }                    if (presentProps.size() > 0) {                        String presentPropsString = asString((String[])presentProps.toArray(new String[presentProps.size()]), " ");                        command.put(SVNProperty.PRESENT_PROPS, presentPropsString);                    } else {                        command.put(SVNProperty.PRESENT_PROPS, "");                    }                                            command.put(SVNProperty.HAS_PROPS, SVNProperty.toString(!props.isEmpty()));                            boolean hasPropModifications = !propsDiff.isEmpty();                    command.put(SVNProperty.HAS_PROP_MODS, SVNProperty.toString(hasPropModifications));                    command.put(ISVNLog.NAME_ATTR, name);                    log.addCommand(ISVNLog.MODIFY_ENTRY, command, false);                    //don't care of the value, because we need only the presence of a mapping                    processedEntries.put(name, "");                    command.clear();                                            String dstPath = getThisDirName().equals(name) ? "dir-props" : "props/" + name + ".svn-work";                    dstPath = getAdminDirectory().getName() + "/" + dstPath;                            if (hasPropModifications) {                        String tmpPath = "tmp/";                        tmpPath += getThisDirName().equals(name) ? "dir-props" : "props/" + name + ".svn-work";                        File tmpFile = getAdminFile(tmpPath);                        String srcPath = getAdminDirectory().getName() + "/" + tmpPath;                        SVNProperties tmpProps = new SVNProperties(tmpFile, srcPath);                        tmpProps.setProperties(props.asMap());                        command.put(ISVNLog.NAME_ATTR, srcPath);                        command.put(ISVNLog.DEST_ATTR, dstPath);                        log.addCommand(SVNLog.MOVE, command, false);                        command.clear();                        command.put(SVNLog.NAME_ATTR, dstPath);                        log.addCommand(SVNLog.READONLY, command, false);                    } else {                        command.put(ISVNLog.NAME_ATTR, dstPath);                        log.addCommand(SVNLog.DELETE, command, false);                    }                    command.clear();                }            }        }                Map basePropsCache = getBasePropertiesStorage(false);        if (basePropsCache != null && !basePropsCache.isEmpty()) {            for(Iterator entries = basePropsCache.keySet().iterator(); entries.hasNext();) {                String name = (String)entries.next();                ISVNProperties baseProps = (ISVNProperties)basePropsCache.get(name);                if (baseProps.isModified()) {                    String dstPath = getThisDirName().equals(name) ? "dir-prop-base" : "prop-base/" + name + ".svn-base";                    dstPath = getAdminDirectory().getName() + "/" + dstPath;                    boolean isEntryProcessed = processedEntries.containsKey(name);                    if (!isEntryProcessed) {                        ISVNProperties props = getProperties(name);                                                String[] cachableProps = SVNAdminArea14.getCachableProperties();                        command.put(SVNProperty.CACHABLE_PROPS, asString(cachableProps, " "));                                                Map propsMap = props.loadProperties();                        LinkedList presentProps = new LinkedList();                        for (int i = 0; i < cachableProps.length; i++) {                            if (propsMap.containsKey(cachableProps[i])) {                                presentProps.addLast(cachableProps[i]);                            }                        }                                                if (presentProps.size() > 0) {                            String presentPropsString = asString((String[])presentProps.toArray(new String[presentProps.size()]), " ");                            command.put(SVNProperty.PRESENT_PROPS, presentPropsString);                        } else {                            command.put(SVNProperty.PRESENT_PROPS, "");                        }                                                command.put(SVNProperty.HAS_PROPS, SVNProperty.toString(props.isEmpty()));                        ISVNProperties propsDiff = baseProps.compareTo(props);                        boolean hasPropModifications = !propsDiff.isEmpty();                        command.put(SVNProperty.HAS_PROP_MODS, SVNProperty.toString(hasPropModifications));                        command.put(ISVNLog.NAME_ATTR, name);                        log.addCommand(ISVNLog.MODIFY_ENTRY, command, false);                        command.clear();                    }                                    if (baseProps.isEmpty()) {                        command.put(ISVNLog.NAME_ATTR, dstPath);                        log.addCommand(SVNLog.DELETE, command, false);                    } else {                        String tmpPath = "tmp/";                        tmpPath += getThisDirName().equals(name) ? "dir-prop-base" : "prop-base/" + name + ".svn-base";                        File tmpFile = getAdminFile(tmpPath);                        String srcPath = getAdminDirectory().getName() + "/" + tmpPath;                        SVNProperties tmpProps = new SVNProperties(tmpFile, srcPath);                        tmpProps.setProperties(baseProps.asMap());                        command.put(ISVNLog.NAME_ATTR, srcPath);                        command.put(ISVNLog.DEST_ATTR, dstPath);                        log.addCommand(SVNLog.MOVE, command, false);                        command.clear();                        command.put(SVNLog.NAME_ATTR, dstPath);                        log.addCommand(SVNLog.READONLY, command, false);                    }                }            }        }                if (close) {            closeVersionedProperties();        }    }