@Deprecated public SCMRevisionState _calcRevisionsFromBuild(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException { return calcRevisionsFromBuild(build, launcher, listener); }
@Deprecated public SCMRevisionState calcRevisionsFromBuild(AbstractBuild<?,?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException { return calcRevisionsFromBuild(build, launcher != null ? build.getWorkspace() : null, launcher, listener); }
return calcRevisionsFromBuild((AbstractBuild) build, launcher, listener); } else { throw new AbstractMethodError("you must override the new calcRevisionsFromBuild overload");
/** * Pushes the baseline up to the newly checked out revision. */ private void calcPollingBaseline(AbstractBuild build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException { SCMRevisionState baseline = build.getAction(SCMRevisionState.class); if (baseline==null) { try { baseline = getScm().calcRevisionsFromBuild(build, launcher, listener); } catch (AbstractMethodError e) { baseline = SCMRevisionState.NONE; // pre-1.345 SCM implementations, which doesn't use the baseline in polling } if (baseline!=null) build.addAction(baseline); } pollingBaseline = baseline; }
/** * Convenience method for the caller to handle the backward compatibility between pre 1.345 SCMs. */ public final PollingResult poll(AbstractProject<?,?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline) throws IOException, InterruptedException { if (is1_346OrLater()) { // This is to work around HUDSON-5827 in a general way. // don't let the SCM.compareRemoteRevisionWith(...) see SCMRevisionState that it didn't produce. SCMRevisionState baseline2; if (baseline!=SCMRevisionState.NONE) { baseline2 = baseline; } else { baseline2 = calcRevisionsFromBuild(project.getLastBuild(), launcher, listener); } return compareRemoteRevisionWith(project, launcher, workspace, listener, baseline2); } else { return pollChanges(project,launcher,workspace,listener) ? PollingResult.SIGNIFICANT : PollingResult.NO_CHANGES; } }
/** * A pointless function to work around what appears to be a HotSpot problem. * See HUDSON-5756 and bug 6933067 on BugParade for more details. */ public SCMRevisionState _calcRevisionsFromBuild(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException { return calcRevisionsFromBuild(build, launcher, listener); }
/** * A pointless function to work around what appears to be a HotSpot problem. See HUDSON-5756 and bug 6933067 * on BugParade for more details. */ public SCMRevisionState _calcRevisionsFromBuild(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException { return calcRevisionsFromBuild(build, launcher, listener); }
/** * A pointless function to work around what appears to be a HotSpot problem. See HUDSON-5756 and bug 6933067 * on BugParade for more details. */ public SCMRevisionState _calcRevisionsFromBuild(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException { return calcRevisionsFromBuild(build, launcher, listener); }
/** * A pointless function to work around what appears to be a HotSpot problem. See HUDSON-5756 and bug 6933067 * on BugParade for more details. */ public SCMRevisionState _calcRevisionsFromBuild(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException { return calcRevisionsFromBuild(build, launcher, listener); }
@Deprecated public SCMRevisionState _calcRevisionsFromBuild(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException { return calcRevisionsFromBuild(build, launcher, listener); }
@Deprecated public SCMRevisionState calcRevisionsFromBuild(AbstractBuild<?,?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException { return calcRevisionsFromBuild(build, launcher != null ? build.getWorkspace() : null, launcher, listener); }
return calcRevisionsFromBuild((AbstractBuild) build, launcher, listener); } else { throw new AbstractMethodError("you must override the new calcRevisionsFromBuild overload");
@Override public SCMRevisionState calcRevisionsFromBuild(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException { MultiSCMRevisionState revisionStates = new MultiSCMRevisionState(); for(SCM scm : scms) { SCMRevisionState scmState = scm.calcRevisionsFromBuild(build, launcher, listener); revisionStates.add(scm, build.getWorkspace(), build, scmState); } return revisionStates; }
/** * Pushes the baseline up to the newly checked out revision. */ private void calcPollingBaseline(AbstractBuild build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException { SCMRevisionState baseline = build.getAction(SCMRevisionState.class); if (baseline==null) { try { baseline = getScm().calcRevisionsFromBuild(build, launcher, listener); } catch (AbstractMethodError e) { baseline = SCMRevisionState.NONE; // pre-1.345 SCM implementations, which doesn't use the baseline in polling } if (baseline!=null) build.addAction(baseline); } pollingBaseline = baseline; }
/** * Convenience method for the caller to handle the backward compatibility between pre 1.345 SCMs. */ public final PollingResult poll(AbstractProject<?,?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline) throws IOException, InterruptedException { if (is1_346OrLater()) { // This is to work around HUDSON-5827 in a general way. // don't let the SCM.compareRemoteRevisionWith(...) see SCMRevisionState that it didn't produce. SCMRevisionState baseline2; if (baseline!=SCMRevisionState.NONE) { baseline2 = baseline; } else { baseline2 = calcRevisionsFromBuild(project.getLastBuild(), launcher, listener); } return compareRemoteRevisionWith(project, launcher, workspace, listener, baseline2); } else { return pollChanges(project,launcher,workspace,listener) ? PollingResult.SIGNIFICANT : PollingResult.NO_CHANGES; } }
SCMRevisionState pollingBaseline = null; if (poll || changelog) { pollingBaseline = scm.calcRevisionsFromBuild(run, workspace, launcher, listener); if (pollingBaseline != null) { MultiSCMRevisionState state = run.getAction(MultiSCMRevisionState.class);