Map basePropsCache = getBasePropertiesStorage(false);
if (basePropsCache == null || basePropsCache.isEmpty()) {
return;
}
SVNProperties command = new SVNProperties();
for(Iterator entries = basePropsCache.keySet().iterator(); entries.hasNext();) {
String name = (String)entries.next();
SVNVersionedProperties props = (SVNVersionedProperties)basePropsCache.get(name);
if (props.isModified()) {
String dstPath = getThisDirName().equals(name) ? "dir-prop-base" : "prop-base/" + name + ".svn-base";
dstPath = getAdminDirectory().getName() + "/" + dstPath;
if (props.isEmpty()) {
command.put(SVNLog.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;
SVNWCProperties tmpProps = new SVNWCProperties(tmpFile, srcPath);
tmpProps.setProperties(props.asMap());
command.put(SVNLog.NAME_ATTR, srcPath);
command.put(SVNLog.DEST_ATTR, dstPath);
log.addCommand(SVNLog.MOVE, command, false);
command.clear();
command.put(SVNLog.NAME_ATTR, dstPath);
log.addCommand(SVNLog.READONLY, command, false);
}
props.setModified(false);
command.clear();
}
}
}