code: public @CheckForNull SCMRevisionState calcRevisionsFromBuild(@Nonnull Run<?,?> build, @Nullable FilePath workspace, @Nullable Launcher launcher, @Nonnull TaskListener listener) throws IOException, InterruptedException {
          if (build instanceof AbstractBuild && Util.isOverridden(SCM.class, getClass(), "calcRevisionsFromBuild", AbstractBuild.class, Launcher.class, TaskListener.class)) {
              return calcRevisionsFromBuild((AbstractBuild) build, launcher, listener);
          } else {
              throw new AbstractMethodError("you must override the new calcRevisionsFromBuild overload");
          }
      }
docs: Calculates the {@link SCMRevisionState} that represents the state of the workspace of the given build.
  
  <p>
  The returned object is then fed into the
  {@link #compareRemoteRevisionWith(AbstractProject, Launcher, FilePath, TaskListener, SCMRevisionState)} method
  as the baseline {@link SCMRevisionState} to determine if the build is necessary.
  
  <p>
  This method is called after source code is checked out for the given build (that is, after
  {@link SCM#checkout(Run, Launcher, FilePath, TaskListener, File, SCMRevisionState)} has finished successfully.)
  
  <p>
  The obtained object is added to the build as an {@link Action} for later retrieval. As an optimization,
  {@link SCM} implementation can choose to compute {@link SCMRevisionState} and add it as an action
  during check out, in which case this method will not called.
  
  @param build
  The calculated {@link SCMRevisionState} is for the files checked out in this build.
  If {@link #requiresWorkspaceForPolling()} returns true, Hudson makes sure that the workspace of this
  build is available and accessible by the callee.
  @param workspace the location of the checkout; normally not null, since this will normally be called immediately after checkout,
  though could be null if data is being loaded from a very old version of Jenkins and the SCM declares that it does not require a workspace for polling
  @param launcher
  Abstraction of the machine where the polling will take place. Nullness matches that of {@code workspace}.
  @param listener
  Logs during the polling should be sent here.
  
  @throws InterruptedException
  interruption is usually caused by the user aborting the computation.
  this exception should be simply propagated all the way up.
  @since 1.568