Chris Z commented on Bug JENKINS-17443

In general error handling in Subversion plugin is not on the same level as svnkit's. Currently I'm working on the externals proper handling. And new feture to fail build whenever error occurs.

For your problem this should help:

src/main/java/hudson/scm/subversion/CheckoutUpdater.java

index d6f36c3..44fb04e 100755
— a/src/main/java/hudson/scm/subversion/CheckoutUpdater.java
+++ b/src/main/java/hudson/scm/subversion/CheckoutUpdater.java
@@ -34,6 +34,7 @@ import hudson.util.StreamCopyThread;

import org.apache.commons.lang.time.FastDateFormat;
import org.kohsuke.stapler.DataBoundConstructor;
+import org.tmatesoft.svn.core.SVNErrorCode;
import org.tmatesoft.svn.core.SVNCancelException;
import org.tmatesoft.svn.core.SVNDepth;
import org.tmatesoft.svn.core.SVNException;
@@ -90,7 +91,7 @@ public class CheckoutUpdater extends WorkspaceUpdater {
listener.getLogger().println("Checking out " + location.remote + " at revision " + revisionName);

File local = new File(ws, location.getLocalDir());

  • SubversionUpdateEventHandler eventHandler = new SubversionUpdateEventHandler(new PrintStream(pos), externals, local, location.getLocalDir());
    + SubversionUpdateEventHandler eventHandler = new SubversionUpdateEventHandler(new PrintStream(pos), externals, local, location.getLocalDir(),location.isExternalFailOption());
    svnuc.setEventHandler(eventHandler);
    svnuc.setExternalsHandler(eventHandler);
    svnuc.setIgnoreExternals(location.isIgnoreExternalsOption());
    @@ -106,8 +107,15 @@ public class CheckoutUpdater extends WorkspaceUpdater { throw (InterruptedException)new InterruptedException().initCause(e); }
    } catch (SVNException e) {
  • e.printStackTrace(listener.error("Failed to check out " + location.remote));
  • return null;
    + if(e.getErrorMessage().getErrorCode() == SVNErrorCode.CL_ERROR_PROCESSING_EXTERNALS){ + listener.getLogger().println(e.getMessage()); + listener.getLogger().println("Checkout failed due to the error in external !"); + throw (IOException) new IOException().initCause(new UpdaterException("failed to perform svn checkout", e)); + }
    + else{ + e.printStackTrace(listener.error("Failed to check out " + location.remote)); + return null; + }
    } finally {
    try {
    pos.close();
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to