SVNStatusType propStatus = SVNStatusType.UNKNOWN;
SVNAdminArea adminArea = myCurrentDirectory.getAdminArea();
if (myCurrentDirectory.wasIncomplete) {
// delete all props.
SVNVersionedProperties oldBaseProps = adminArea.getBaseProperties(adminArea.getThisDirName());
SVNProperties baseMap = oldBaseProps.asMap();
if (modifiedProps == null) {
modifiedProps = new SVNProperties();
}
for(Iterator names = baseMap.nameSet().iterator(); names.hasNext();) {
String name = (String) names.next();
if (!modifiedProps.containsName(name)) {
modifiedProps.put(name, SVNPropertyValue.create(null));
}
}
}
if (modifiedWCProps != null || modifiedEntryProps != null || modifiedProps != null) {
SVNLog log = myCurrentDirectory.getLog();
if (modifiedProps != null && !modifiedProps.isEmpty()) {
if (modifiedProps.containsName(SVNProperty.EXTERNALS)) {
String oldExternal = adminArea.getProperties(adminArea.getThisDirName()).getStringPropertyValue(SVNProperty.EXTERNALS);
String newExternal = modifiedProps.getStringValue(SVNProperty.EXTERNALS);
String path = myCurrentDirectory.getPath();
if (oldExternal == null && newExternal != null) {
myAdminInfo.addExternal(path, oldExternal, newExternal);
myAdminInfo.addDepth(path, myCurrentDirectory.myAmbientDepth);
} else if (oldExternal != null && newExternal == null) {
myAdminInfo.addExternal(path, oldExternal, newExternal);
myAdminInfo.addDepth(path, myCurrentDirectory.myAmbientDepth);
} else if (oldExternal != null && !oldExternal.equals(newExternal)) {
myAdminInfo.addExternal(path, oldExternal, newExternal);
myAdminInfo.addDepth(path, myCurrentDirectory.myAmbientDepth);
}
}
SVNVersionedProperties oldBaseProps = adminArea.getBaseProperties(adminArea.getThisDirName());
try {
propStatus = adminArea.mergeProperties(adminArea.getThisDirName(), oldBaseProps.asMap(),
modifiedProps, null, null, true, false, log);
} catch (SVNException svne) {
SVNErrorMessage err = svne.getErrorMessage().wrap("Couldn't do property merge");
SVNErrorManager.error(err, svne, SVNLogType.WC);
}