retrieveParent(wcFile, myIsDryRun);
} catch (SVNException e) {
if (e.getErrorMessage().getErrorCode() == SVNErrorCode.WC_NOT_LOCKED) {
if (myEventHandler != null) {
action = SVNEventAction.SKIP;
SVNEvent event = SVNEventFactory.createSVNEvent(wcFile,
SVNNodeKind.FILE, null, SVNRepository.INVALID_REVISION, SVNStatusType.MISSING,
SVNStatusType.UNKNOWN, null, action, expectedAction, null, null);
myEventHandler.handleEvent(event, ISVNEventHandler.UNKNOWN);
}
return;
}
throw e;
}
if (file != null || !propertyDiff.isEmpty()) {
String baseMimeType = baseProperties.getStringValue(SVNProperty.MIME_TYPE);
String mimeType = propertyDiff.getStringValue(SVNProperty.MIME_TYPE);
if (added) {
type = getDiffCallback().fileAdded(commitPath,
file != null ? baseFile : null, file,
0, myRevision2, baseMimeType, mimeType,
baseProperties, propertyDiff, isTreeConflicted);
} else {
type = getDiffCallback().fileChanged(commitPath,
file != null ? baseFile : null, file,
myRevision1, myRevision2, baseMimeType, mimeType,
baseProperties, propertyDiff, isTreeConflicted);
}
}
if (isTreeConflicted != null && isTreeConflicted.length > 0 && isTreeConflicted[0]) {
action = SVNEventAction.TREE_CONFLICT;
} else if (type[0] == SVNStatusType.MISSING || type[0] == SVNStatusType.OBSTRUCTED) {
action = SVNEventAction.SKIP;
} else if (added) {
action = SVNEventAction.UPDATE_ADD;
} else {
action = SVNEventAction.UPDATE_UPDATE;
}
if (myEventHandler != null) {
boolean isReplace = false;
KindActionState kas = (KindActionState) myDeletedPaths.get(wcFile);
if (kas != null) {
SVNEventAction newAction = kas.myAction;
if (kas.myAction == SVNEventAction.UPDATE_DELETE && action == SVNEventAction.UPDATE_ADD) {
isReplace = true;
newAction = SVNEventAction.UPDATE_REPLACE;
}
SVNEvent event = SVNEventFactory.createSVNEvent(wcFile, kas.myKind, null,
SVNRepository.INVALID_REVISION, kas.myStatus, kas.myStatus, SVNStatusType.INAPPLICABLE,
newAction, expectedAction, null, null);
myEventHandler.handleEvent(event, ISVNEventHandler.UNKNOWN);
myDeletedPaths.remove(wcFile);
}
if (!isReplace) {
SVNEvent event = SVNEventFactory.createSVNEvent(wcFile, SVNNodeKind.FILE,
null, SVNRepository.INVALID_REVISION, type[0], type[1], null, action, expectedAction,
null, null);
myEventHandler.handleEvent(event, ISVNEventHandler.UNKNOWN);
}
}