Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-4605] Builds aborted during SCM checkout should be mar…
…ked as aborted instead of failed
  • Loading branch information
kutzi committed Nov 8, 2011
1 parent 72e7c6c commit 3037609
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/main/java/hudson/scm/subversion/CheckoutUpdater.java
Expand Up @@ -32,6 +32,7 @@
import hudson.util.IOException2;
import hudson.util.StreamCopyThread;
import org.kohsuke.stapler.DataBoundConstructor;
import org.tmatesoft.svn.core.SVNCancelException;
import org.tmatesoft.svn.core.SVNDepth;
import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.wc.SVNRevision;
Expand Down Expand Up @@ -59,9 +60,6 @@ public CheckoutUpdater() {}
@Override
public UpdateTask createTask() {
return new UpdateTask() {
/**
*
*/
private static final long serialVersionUID = 8349986526712487762L;

@Override
Expand All @@ -84,7 +82,9 @@ public List<External> perform() throws IOException, InterruptedException {
File local = new File(ws, location.getLocalDir());
svnuc.setEventHandler(new SubversionUpdateEventHandler(new PrintStream(pos), externals, local, location.getLocalDir()));
svnuc.doCheckout(location.getSVNURL(), local.getCanonicalFile(), SVNRevision.HEAD, getRevision(location), SVNDepth.INFINITY, true);

} catch (SVNCancelException e) {
listener.error("Subversion checkout has been canceled");
throw (InterruptedException)new InterruptedException().initCause(e);
} catch (SVNException e) {
e.printStackTrace(listener.error("Failed to check out " + location.remote));
return null;
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/hudson/scm/subversion/UpdateUpdater.java
Expand Up @@ -33,6 +33,7 @@
import hudson.scm.SubversionSCM.SvnInfo;
import hudson.triggers.SCMTrigger;
import org.kohsuke.stapler.DataBoundConstructor;
import org.tmatesoft.svn.core.SVNCancelException;
import org.tmatesoft.svn.core.SVNDepth;
import org.tmatesoft.svn.core.SVNErrorCode;
import org.tmatesoft.svn.core.SVNException;
Expand Down Expand Up @@ -132,7 +133,9 @@ public List<External> perform() throws IOException, InterruptedException {
preUpdate(location, local);
listener.getLogger().println("Updating " + location.remote);
svnuc.doUpdate(local.getCanonicalFile(), r, SVNDepth.INFINITY, true, false);

} catch (SVNCancelException e) {
listener.error("Subversion update has been canceled");
throw (InterruptedException)new InterruptedException().initCause(e);
} catch (final SVNException e) {
if (e.getErrorMessage().getErrorCode() == SVNErrorCode.WC_LOCKED) {
// work space locked. try fresh check out
Expand Down

0 comments on commit 3037609

Please sign in to comment.