dir.saveEntries(false);
}
public static void markTreeCancellable(SVNAdminArea dir, String schedule, boolean copied, boolean keepLocal, int flags) throws SVNException {
Map attributes = new SVNHashMap();
Map recurseMap = new SVNHashMap();
for (Iterator entries = dir.entries(false); entries.hasNext();) {
SVNEntry entry = (SVNEntry) entries.next();
if (dir.getThisDirName().equals(entry.getName())) {
continue;
}
File path = dir.getFile(entry.getName());
if (entry.getKind() == SVNNodeKind.DIR) {
SVNAdminArea childDir = dir.getWCAccess().retrieve(path);
// leave for recursion, do not set anything on 'dir' entry.
recurseMap.put(entry.getName(), childDir);
continue;
}
if ((flags & SCHEDULE) != 0) {
attributes.put(SVNProperty.SCHEDULE, schedule);
}
if ((flags & COPIED) != 0) {
attributes.put(SVNProperty.COPIED, copied ? Boolean.TRUE.toString() : null);
}
dir.modifyEntry(entry.getName(), attributes, true, false);
attributes.clear();
if (SVNProperty.SCHEDULE_DELETE.equals(schedule)) {
SVNEvent event = SVNEventFactory.createSVNEvent(dir.getFile(entry.getName()), SVNNodeKind.UNKNOWN, null, 0, SVNEventAction.DELETE, null, null, null);
dir.getWCAccess().handleEvent(event);
}
}
SVNEntry dirEntry = dir.getEntry(dir.getThisDirName(), false);
if (!(dirEntry.isScheduledForAddition() && SVNProperty.SCHEDULE_DELETE.equals(schedule))) {
if ((flags & SCHEDULE) != 0) {
attributes.put(SVNProperty.SCHEDULE, schedule);
}
if ((flags & COPIED) != 0) {
attributes.put(SVNProperty.COPIED, copied ? Boolean.TRUE.toString() : null);
}
if (keepLocal) {
attributes.put(SVNProperty.KEEP_LOCAL, SVNProperty.toString(true));
}
dir.modifyEntry(dir.getThisDirName(), attributes, true, false);
attributes.clear();
}
dir.saveEntries(false);
// could check for cancellation - entries file saved.
dir.getWCAccess().checkCancelled();
// recurse.
for (Iterator dirs = recurseMap.keySet().iterator(); dirs.hasNext();) {
String entryName = (String) dirs.next();
SVNAdminArea childDir = (SVNAdminArea) recurseMap.get(entryName);
// update 'dir' entry, save entries file again, then enter recursion.
if ((flags & SCHEDULE) != 0) {
attributes.put(SVNProperty.SCHEDULE, schedule);
}
if ((flags & COPIED) != 0) {