diff --git a/core/src/main/java/hudson/scm/SubversionSCM.java b/core/src/main/java/hudson/scm/SubversionSCM.java index a9334ffb46..bb52ac1eda 100644 --- a/core/src/main/java/hudson/scm/SubversionSCM.java +++ b/core/src/main/java/hudson/scm/SubversionSCM.java @@ -4,7 +4,6 @@ import hudson.FilePath; import hudson.FilePath.FileCallable; import hudson.Launcher; import hudson.Util; -import hudson.triggers.SCMTrigger; import hudson.model.AbstractBuild; import hudson.model.AbstractProject; import hudson.model.BuildListener; @@ -13,23 +12,24 @@ import hudson.model.TaskListener; import hudson.remoting.Callable; import hudson.remoting.Channel; import hudson.remoting.VirtualChannel; +import hudson.triggers.SCMTrigger; +import hudson.util.EditDistance; import hudson.util.FormFieldValidator; import hudson.util.IOException2; import hudson.util.MultipartFormDataParser; import hudson.util.Scrambler; -import hudson.util.EditDistance; import org.apache.commons.fileupload.FileItem; import org.apache.commons.io.FileUtils; import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Chmod; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse; +import org.tmatesoft.svn.core.SVNDirEntry; import org.tmatesoft.svn.core.SVNErrorCode; import org.tmatesoft.svn.core.SVNErrorMessage; import org.tmatesoft.svn.core.SVNException; -import org.tmatesoft.svn.core.SVNURL; import org.tmatesoft.svn.core.SVNNodeKind; -import org.tmatesoft.svn.core.SVNDirEntry; +import org.tmatesoft.svn.core.SVNURL; import org.tmatesoft.svn.core.auth.ISVNAuthenticationManager; import org.tmatesoft.svn.core.auth.ISVNAuthenticationProvider; import org.tmatesoft.svn.core.auth.SVNAuthentication; @@ -40,9 +40,9 @@ import org.tmatesoft.svn.core.auth.SVNUserNameAuthentication; import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; import org.tmatesoft.svn.core.internal.io.fs.FSRepositoryFactory; import org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryFactoryImpl; -import org.tmatesoft.svn.core.internal.wc.DefaultSVNAuthenticationManager; import org.tmatesoft.svn.core.internal.util.SVNPathUtil; -import org.tmatesoft.svn.core.io.ISVNSession; +import org.tmatesoft.svn.core.internal.wc.DefaultSVNAuthenticationManager; +import org.tmatesoft.svn.core.internal.wc.SVNErrorManager; import org.tmatesoft.svn.core.io.SVNRepository; import org.tmatesoft.svn.core.io.SVNRepositoryFactory; import org.tmatesoft.svn.core.wc.SVNClientManager; @@ -1000,6 +1000,16 @@ public class SubversionSCM extends SCM implements Serializable { return cred.createSVNAuthentication(kind); } + /** + * Getting here means the authentication tried in {@link #getFirstAuthentication(String, String, SVNURL)} + * didn't work. + */ + @Override + public SVNAuthentication getNextAuthentication(String kind, String realm, SVNURL url) throws SVNException { + SVNErrorManager.authenticationFailed("Authentication failed for ''{0}''", realm); + return null; + } + @Override public void acknowledgeAuthentication(boolean accepted, String kind, String realm, SVNErrorMessage errorMessage, SVNAuthentication authentication) throws SVNException { if(accepted) {