&& (justLocked || textModified || propsModified
|| commitDeletion || commitAddition || commitCopy);
if (commitAddition || commitDeletion || textModified || propsModified
|| commitCopy || commitLock) {
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());
}
}
if (entries != null && recursive && (commitAddition || !commitDeletion)) {
// recurse.
for (Iterator ents = entries.entries(copyMode); ents.hasNext();) {
if (dir != null && dir.getWCAccess() != null) {
dir.getWCAccess().checkCancelled();
}
SVNEntry currentEntry = (SVNEntry) ents.next();
if ("".equals(currentEntry.getName())) {
continue;
}
// if recursion is forced and entry is explicitly copied, skip it.
if (forcedRecursion && currentEntry.isCopied() && currentEntry.getCopyFromURL() != null) {
continue;
}
String currentCFURL = cfURL != null ? cfURL : copyFromURL;
if (currentCFURL != null) {
currentCFURL = SVNPathUtil.append(currentCFURL, SVNEncodingUtil.uriEncode(currentEntry.getName()));
}
String currentURL = currentEntry.getURL();
if (copyMode || entry.getURL() == null) {
currentURL = SVNPathUtil.append(url, SVNEncodingUtil.uriEncode(currentEntry.getName()));
}
File currentFile = dir.getFile(currentEntry.getName());
SVNAdminArea childDir;
if (currentEntry.getKind() == SVNNodeKind.DIR) {
try {
childDir = dir.getWCAccess().retrieve(dir.getFile(currentEntry.getName()));
} catch (SVNException e) {
if (e.getErrorMessage().getErrorCode() == SVNErrorCode.WC_NOT_LOCKED) {
childDir = null;
} else {
throw e;
}
}
if (childDir == null) {
SVNFileType currentType = SVNFileType.getType(currentFile);
if (currentType == SVNFileType.NONE && currentEntry.isScheduledForDeletion()) {
SVNCommitItem item = new SVNCommitItem(currentFile,
SVNURL.parseURIEncoded(currentURL), null, currentEntry.getKind(),
SVNRevision.UNDEFINED, SVNRevision.UNDEFINED, false, true, false,
false, false, false);
String dirPath = dir.getRelativePath(dir.getWCAccess().retrieve(dir.getWCAccess().getAnchor()));
item.setPath(SVNPathUtil.append(dirPath, currentEntry.getName()));
commitables.put(currentFile, item);
continue;
} else if (currentType != SVNFileType.NONE) {
// directory is not missing, but obstructed,
// or no special params are specified.
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.WC_NOT_LOCKED, "Working copy ''{0}'' is missing or not locked", currentFile);
SVNErrorManager.error(err);
} else {
ISVNCommitParameters.Action action =
params != null ? params.onMissingDirectory(dir.getFile(currentEntry.getName())) : ISVNCommitParameters.ERROR;
if (action == ISVNCommitParameters.DELETE) {
SVNCommitItem item = new SVNCommitItem(currentFile,
SVNURL.parseURIEncoded(currentURL), null, currentEntry.getKind(),
SVNRevision.UNDEFINED, SVNRevision.UNDEFINED, false, true, false,
false, false, false);
String dirPath = dir.getRelativePath(dir.getWCAccess().retrieve(dir.getWCAccess().getAnchor()));
item.setPath(SVNPathUtil.append(dirPath, currentEntry.getName()));
commitables.put(currentFile, item);
currentEntry.scheduleForDeletion();
entries.saveEntries(false);
continue;
} else if (action != ISVNCommitParameters.SKIP) {