SVNErrorManager.error(err, SVNLogType.WC);
}
}
}
dir.removeFromRevisionControl(name, deleteFiles, false);
SVNEvent event = SVNEventFactory.createSVNEvent(path, SVNNodeKind.UNKNOWN, null, 0, SVNEventAction.DELETE, null, null, null);
wcAccess.handleEvent(event);
return;
}
String schedule = entry.getSchedule();
SVNNodeKind kind = entry.getKind();
boolean copied = entry.isCopied();
boolean deleted = false;
String name = path.getName();
if (kind == SVNNodeKind.DIR) {
SVNAdminArea parent = wcAccess.retrieve(path.getParentFile());
SVNEntry entryInParent = parent.getEntry(name, true);
deleted = entryInParent != null ? entryInParent.isDeleted() : false;
if (!deleted && SVNProperty.SCHEDULE_ADD.equals(schedule)) {
if (dir != root) {
dir.removeFromRevisionControl("", false, false);
} else {
parent.deleteEntry(name);
parent.saveEntries(false);
}
} else {
if (dir != root) {
if (cancellable) {
markTreeCancellable(dir, SVNProperty.SCHEDULE_DELETE, false, !deleteFiles, SCHEDULE);
} else {
markTree(dir, SVNProperty.SCHEDULE_DELETE, false, !deleteFiles, SCHEDULE | KEEP_LOCAL);
}
}
}
}
if (!(kind == SVNNodeKind.DIR && SVNProperty.SCHEDULE_ADD.equals(schedule) && !deleted)) {
SVNLog log = root.getLog();
SVNProperties command = new SVNProperties();
command.put(SVNLog.NAME_ATTR, name);
command.put(SVNProperty.shortPropertyName(SVNProperty.SCHEDULE), SVNProperty.SCHEDULE_DELETE);
log.addCommand(SVNLog.MODIFY_ENTRY, command, false);
command.clear();
if (SVNProperty.SCHEDULE_REPLACE.equals(schedule) && copied) {
if (kind != SVNNodeKind.DIR) {
command.put(SVNLog.NAME_ATTR, SVNAdminUtil.getTextRevertPath(name, false));
command.put(SVNLog.DEST_ATTR, SVNAdminUtil.getTextBasePath(name, false));
log.addCommand(SVNLog.MOVE, command, false);
command.clear();
}
command.put(SVNLog.NAME_ATTR, SVNAdminUtil.getPropRevertPath(name, kind, false));
command.put(SVNLog.DEST_ATTR, SVNAdminUtil.getPropBasePath(name, kind, false));
log.addCommand(SVNLog.MOVE, command, false);
command.clear();
}
if (SVNProperty.SCHEDULE_ADD.equals(schedule)) {
command.put(SVNLog.NAME_ATTR, SVNAdminUtil.getPropPath(name, kind, false));
log.addCommand(SVNLog.DELETE, command, false);
command.clear();
command.put(SVNLog.NAME_ATTR, SVNAdminUtil.getPropBasePath(name, kind, false));
log.addCommand(SVNLog.DELETE, command, false);
command.clear();
command.put(SVNLog.NAME_ATTR, SVNAdminUtil.getTextBasePath(name, false));
log.addCommand(SVNLog.DELETE, command, false);
command.clear();
}
log.save();
root.runLogs();
}
SVNEvent event = SVNEventFactory.createSVNEvent(root.getFile(name), SVNNodeKind.UNKNOWN, null, 0, SVNEventAction.DELETE, null, null, null);
wcAccess.handleEvent(event);
if (SVNProperty.SCHEDULE_ADD.equals(schedule)) {
SVNWCManager.doDeleteUnversionedFiles(wcAccess, path, deleteFiles);
} else {
SVNWCManager.doEraseFromWC(path, root, kind, deleteFiles);