@Override
public void handleEvent(SVNEvent event, double progress) throws SVNException {
SVNEventAction action = event.getAction();
if (action == SVNEventAction.UPDATE_EXTERNAL || action == SVNEventAction.UPDATE_COMPLETED) {
File file = event.getFile();
SVNExternalDetails details = externalDetails.remove(file);
if (details != null) {
String path;
try {
path = getLocalPath(getRelativePath(file));
} catch (IOException e) {
throw new SVNException(new RemotableSVNErrorMessage(SVNErrorCode.FS_GENERAL, e));
}
out.println(Messages.SubversionUpdateEventHandler_FetchExternal(details.getUrl(), event.getRevision(), file));
externals.add(new External(modulePath + '/' + path, details.getUrl(), details.getRevision()));
}
} else if (action == SVNEventAction.FAILED_EXTERNAL) {
File file = event.getFile();
SVNExternalDetails details = externalDetails.get(file);
if (details != null) {
out.println(Messages.SubversionUpdateEventHandler_FetchExternal(details.getUrl(), event.getRevision(), file)
+ " failed!");
}
if (cancelProcessOnExternalsFailed) {
throw new SVNException(new RemotableSVNErrorMessage(SVNErrorCode.CL_ERROR_PROCESSING_EXTERNALS,
SVNErrorCode.CL_ERROR_PROCESSING_EXTERNALS.getDescription() + ": <" + file.getName() + ">"));
}
}
super.handleEvent(event, progress);
}