@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof WorkspaceUpdater)) return false; WorkspaceUpdater that = (WorkspaceUpdater) o; if (!(createTask().equals(that.createTask()))) return false; return true; }
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; } }
/** * Delegates the execution to another updater. This is most often useful to fall back to the fresh check out * by using {@link CheckoutUpdater}. */ protected final List<External> delegateTo(WorkspaceUpdater wu) throws IOException, InterruptedException { return delegateTo(wu.createTask()); }
if (isAuthenticationFailedError(e)) { throw new AbortException("Failed to check out " + location.remote); } else {
/** * Delegates the execution to another updater. This is most often useful to fall back to the fresh check out * by using {@link CheckoutUpdater}. */ protected final List<External> delegateTo(WorkspaceUpdater wu) throws IOException, InterruptedException { return delegateTo(wu.createTask()); }
checkout.run(); } catch (SVNCancelException e) { if (isAuthenticationFailedError(e)) { e.printStackTrace(listener.error("Failed to check out " + location.remote)); return null;
/** * Delegates the execution to another updater. This is most often useful to fall back to the fresh check out * by using {@link CheckoutUpdater}. */ protected final List<External> delegateTo(WorkspaceUpdater wu) throws IOException, InterruptedException { return delegateTo(wu.createTask()); }
CheckOutTask(Run<?, ?> build, SubversionSCM parent, ModuleLocation location, Date timestamp, TaskListener listener, EnvVars env, boolean quietOperation) { this.authProvider = parent.createAuthenticationProvider(build.getParent(), location, listener); this.timestamp = timestamp; this.listener = listener; this.location = location; this.revisions = build.getAction(RevisionParameterAction.class); this.task = parent.getWorkspaceUpdater().createTask(); this.quietOperation = quietOperation; }
public CheckOutTask(AbstractBuild<?, ?> build, SubversionSCM scm, Date queueTime, Date buildTime, TaskListener listener) { this.authProvider = scm.getDescriptor().createAuthenticationProvider(build.getParent()); this.queueTime = queueTime; this.buildTime = buildTime; this.listener = listener; this.locations = scm.getLocations(build); this.revisionParameterAction = build.getAction(RevisionParameterAction.class); this.task = scm.getWorkspaceUpdater().createTask(); this.revisionPolicy = (scm.getDescriptor() != null ? scm.getDescriptor().getRevisionPolicy() : null); }
public CheckOutTask(AbstractBuild<?, ?> build, SubversionSCM scm, Date queueTime, Date buildTime, TaskListener listener) { this.authProvider = scm.getDescriptor().createAuthenticationProvider(build.getParent()); this.queueTime = queueTime; this.buildTime = buildTime; this.listener = listener; this.locations = scm.getLocations(build); this.revisionParameterAction = build.getAction(RevisionParameterAction.class); this.task = scm.getWorkspaceUpdater().createTask(); this.revisionPolicy = (scm.getDescriptor() != null ? scm.getDescriptor().getRevisionPolicy() : null); }