tmpFile.delete();
}
}
// update entry
Map entryAttrs = new SVNHashMap();
entryAttrs.put(SVNProperty.REVISION, SVNProperty.toString(revisionNumber));
entryAttrs.put(SVNProperty.KIND, getThisDirName().equals(fileName) ? SVNProperty.KIND_DIR : SVNProperty.KIND_FILE);
if (!implicit) {
entryAttrs.put(SVNProperty.SCHEDULE, null);
}
entryAttrs.put(SVNProperty.COPIED, SVNProperty.toString(false));
entryAttrs.put(SVNProperty.DELETED, SVNProperty.toString(false));
if (textTime != 0 && !implicit) {
entryAttrs.put(SVNProperty.TEXT_TIME, SVNDate.formatDate(new Date(textTime)));
}
if (propTime != 0 && !implicit) {
entryAttrs.put(SVNProperty.PROP_TIME, SVNDate.formatDate(new Date(propTime)));
}
entryAttrs.put(SVNProperty.CONFLICT_NEW, null);
entryAttrs.put(SVNProperty.CONFLICT_OLD, null);
entryAttrs.put(SVNProperty.CONFLICT_WRK, null);
entryAttrs.put(SVNProperty.PROP_REJECT_FILE, null);
entryAttrs.put(SVNProperty.COPYFROM_REVISION, null);
entryAttrs.put(SVNProperty.COPYFROM_URL, null);
try {
modifyEntry(fileName, entryAttrs, false, true);
} catch (SVNException svne) {
SVNErrorMessage err = SVNErrorMessage.create(errorCode, "Error modifying entry of ''{0}''", fileName);
SVNErrorManager.error(err, svne, SVNLogType.WC);
}
if (!getThisDirName().equals(fileName)) {
return;
}
// update entry in parent.
File dirFile = getRoot();
if (getWCAccess().isWCRoot(getRoot())) {
return;
}
boolean unassociated = false;
SVNAdminArea parentArea = null;
try {
parentArea = getWCAccess().retrieve(dirFile.getParentFile());
} catch (SVNException svne) {
if (svne.getErrorMessage().getErrorCode() == SVNErrorCode.WC_NOT_LOCKED) {
parentArea = getWCAccess().open(dirFile.getParentFile(), true, false, 0);
unassociated = true;
}
throw svne;
}
SVNEntry entryInParent = parentArea.getEntry(dirFile.getName(), false);
if (entryInParent != null) {
entryAttrs.clear();
if (!implicit) {
entryAttrs.put(SVNProperty.SCHEDULE, null);
}
entryAttrs.put(SVNProperty.COPIED, SVNProperty.toString(false));
entryAttrs.put(SVNProperty.COPYFROM_REVISION, null);
entryAttrs.put(SVNProperty.COPYFROM_URL, null);
entryAttrs.put(SVNProperty.DELETED, SVNProperty.toString(false));
try {
parentArea.modifyEntry(entryInParent.getName(), entryAttrs, true, true);
} catch (SVNException svne) {
SVNErrorMessage err = SVNErrorMessage.create(errorCode, "Error modifying entry of ''{0}''", fileName);
SVNErrorManager.error(err, svne, SVNLogType.WC);