if (addedFileType == SVNFileType.NONE) {
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.WC_PATH_NOT_FOUND,
"''{0}'' is scheduled for addition, but is missing", path);
SVNErrorManager.error(err, SVNLogType.WC);
}
SVNVersionedProperties props = dir.getProperties(entry.getName());
SVNVersionedProperties baseProps = dir.getBaseProperties(entry.getName());
SVNProperties propDiff = null;
if (entry.isScheduledForReplacement()) {
propDiff = props.asMap();
} else {
propDiff = baseProps.compareTo(props).asMap();
}
boolean eolChanged = textModified = propDiff != null && propDiff.containsName(SVNProperty.EOL_STYLE);
boolean charsetChanged = propDiff != null && propDiff.containsName(SVNProperty.CHARSET);
textModified = eolChanged || charsetChanged;
if (entry.getKind() == SVNNodeKind.FILE) {
if (commitCopy) {
textModified = propDiff != null && (propDiff.containsName(SVNProperty.EOL_STYLE) || propDiff.containsName(SVNProperty.CHARSET));
if (!textModified) {
textModified = dir.hasTextModifications(entry.getName(), eolChanged);
}
} else {
textModified = true;
}
}
propsModified = propDiff != null && !propDiff.isEmpty();
} else if (!commitDeletion) {
SVNVersionedProperties props = dir.getProperties(entry.getName());
SVNVersionedProperties baseProps = dir.getBaseProperties(entry.getName());
SVNProperties propDiff = baseProps.compareTo(props).asMap();
boolean forceComparison = textModified = propDiff != null && (propDiff.containsName(SVNProperty.EOL_STYLE) || propDiff.containsName(SVNProperty.CHARSET));
propsModified = propDiff != null && !propDiff.isEmpty();
if (entry.getKind() == SVNNodeKind.FILE) {
textModified = dir.hasTextModifications(entry.getName(), forceComparison);
}
}
commitLock = entry.getLockToken() != null && (justLocked || textModified || propsModified
|| commitDeletion || commitAddition || commitCopy);
if (commitAddition || commitDeletion || textModified || propsModified
|| commitCopy || commitLock) {
if (SVNWCAccess.matchesChangeList(changelists, entry)) {
SVNCommitItem item = new SVNCommitItem(path,
SVNURL.parseURIEncoded(url), cfURL != null ? SVNURL.parseURIEncoded(cfURL) : null, entry.getKind(),
SVNRevision.create(entry.getRevision()), SVNRevision.create(cfRevision),
commitAddition, commitDeletion, propsModified, textModified, commitCopy,
commitLock);
String itemPath = dir.getRelativePath(dir.getWCAccess().retrieve(dir.getWCAccess().getAnchor()));
if ("".equals(itemPath)) {
itemPath += entry.getName();
} else if (!"".equals(entry.getName())) {
itemPath += "/" + entry.getName();
}
item.setPath(itemPath);
commitables.put(path, item);
if (lockTokens != null && entry.getLockToken() != null) {
lockTokens.put(url, entry.getLockToken());
}
}
}
//collect externals properties
if (pathsToExternalsProperties != null && SVNWCAccess.matchesChangeList(changelists, entry)) {
SVNVersionedProperties props = dir.getProperties(entry.getName());
String externalsProperty = props.getStringPropertyValue(SVNProperty.EXTERNALS);
if (externalsProperty != null) {
pathsToExternalsProperties.put(dir.getFile(entry.getName()), externalsProperty);
}
}