protected static boolean isAuthenticationFailedError(SVNCancelException e) { // this is very ugly. SVNKit (1.7.4 at least) reports missing authentication data as a cancel exception // "No credential to try. Authentication failed" // See DefaultSVNAuthenticationManager#getFirstAuthentication if (String.valueOf(e.getMessage()).contains("No credential to try") || String.valueOf(e.getMessage()).contains("authentication cancelled")) { return true; } Throwable cause = e.getCause(); if (cause instanceof SVNCancelException) { return isAuthenticationFailedError((SVNCancelException) cause); } else { return false; } }
if (isAuthenticationFailedError(e)) { throw new AbortException("Failed to check out " + location.remote); } else {
checkout.run(); } catch (SVNCancelException e) { if (isAuthenticationFailedError(e)) { e.printStackTrace(listener.error("Failed to check out " + location.remote)); return null;