Package hudson.scm

Class CVSSCM

All Implemented Interfaces:
ExtensionPoint, Describable<SCM>, ICvs, Serializable

public class CVSSCM extends AbstractCvs implements Serializable
CVS.

I couldn't call this class "CVS" because that would cause the view folder name to collide with CVS control files.

This object gets shipped to the remote machine to perform some of the work, so it implements Serializable.

Author:
Kohsuke Kawaguchi, Michael Clarke
See Also:
  • Constructor Details

    • CVSSCM

      @Deprecated public CVSSCM(String cvsRoot, String allModules, String branch, String cvsRsh, boolean canUseUpdate, boolean useHeadIfNotFound, boolean legacy, boolean isTag, String excludedRegions)
      Deprecated.
      we now use multiple repositories and don't use cvsRsh
    • CVSSCM

      @Deprecated public CVSSCM(String cvsRoot, String allModules, String branch, String cvsRsh, boolean canUseUpdate, boolean useHeadIfNotFound, boolean legacy, boolean isTag, String excludedRegions, CVSRepositoryBrowser browser)
      Deprecated.
    • CVSSCM

      @Deprecated public CVSSCM(List<CvsRepository> repositories, boolean canUseUpdate, boolean legacy, boolean skipChangeLog, boolean pruneEmptyDirectories, boolean disableCvsQuiet, boolean cleanOnFailedUpdate, boolean forceCleanCopy)
      Deprecated.
    • CVSSCM

      @DataBoundConstructor public CVSSCM(List<CvsRepository> repositories, boolean canUseUpdate, boolean legacy, boolean skipChangeLog, boolean pruneEmptyDirectories, boolean disableCvsQuiet, boolean cleanOnFailedUpdate, boolean forceCleanCopy, boolean checkoutCurrentTimestamp)
  • Method Details

    • readResolve

      public final Object readResolve()
      Convert legacy configuration into the new class structure.
      Returns:
      an instance of this class with all the new fields transferred from the old structure to the new one
    • getRepositories

      @Exported public CvsRepository[] getRepositories()
      Gets the repositories currently configured for this job.
      Specified by:
      getRepositories in interface ICvs
      Returns:
      an array of CvsRepository
    • getBrowser

      public CvsFacadeRepositoryBrowser getBrowser()
      Overrides:
      getBrowser in class SCM
    • requiresWorkspaceForPolling

      public boolean requiresWorkspaceForPolling()
      Overrides:
      requiresWorkspaceForPolling in class SCM
    • compareRemoteRevisionWith

      protected PollingResult compareRemoteRevisionWith(AbstractProject<?,?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline) throws IOException, InterruptedException
      Checks for differences between the current workspace and the remote repository.
      Overrides:
      compareRemoteRevisionWith in class SCM
      Throws:
      IOException
      InterruptedException
      See Also:
    • getModuleRoot

      public FilePath getModuleRoot(FilePath workspace, AbstractBuild build)
      If there are multiple modules, return the module directory of the first one.
      Overrides:
      getModuleRoot in class SCM
      Parameters:
      workspace -
    • getModuleRoots

      public FilePath[] getModuleRoots(FilePath workspace, AbstractBuild build)
      Overrides:
      getModuleRoots in class SCM
    • isCanUseUpdate

      @Exported public boolean isCanUseUpdate()
      Description copied from interface: ICvs
      Whether CVS update can be used in place of CVS checkout if a workspace is already checked out.
      Specified by:
      isCanUseUpdate in interface ICvs
      Returns:
      true is the cvs up can be used in place of cvs co under the correct circumstances.
    • isSkipChangeLog

      @Exported public boolean isSkipChangeLog()
      Description copied from interface: ICvs
      Allows the option of skipping the changelog generation after checkout. Primarily used to save time as part of the build process . Has no effect on the polling configuration which uses a similar method to calculate changes.
      Specified by:
      isSkipChangeLog in interface ICvs
      Returns:
      whether changelog generation should be skipped or not.
    • isPruneEmptyDirectories

      @Exported public boolean isPruneEmptyDirectories()
      Description copied from interface: ICvs
      Whether CVS should be instructed to remove empty directories as part of checkout/update.
      Specified by:
      isPruneEmptyDirectories in interface ICvs
      Returns:
      if CVS should remove empty directories from the workspace on checkout
    • isFlatten

      @Exported public boolean isFlatten()
      Description copied from interface: ICvs
      Whether to checkout an individual module's files directly into the workspace root rather than into a subdirectory of the module name. Some scripts expect this functionality so this switch allows users to enabled or disable this. Some plugins may not have the option of supporting this if they automatically checkout multiple module (e.g. the CVS projectset plugin)
      Specified by:
      isFlatten in interface ICvs
      Returns:
      true if the files should be checkout directly into the workspace root, false if they should be put in a subdirectory.
    • isDisableCvsQuiet

      @Exported public boolean isDisableCvsQuiet()
      Description copied from interface: ICvs
      CVS is normally run in quiet mode to reduce un-needed log output. This option allows plugins to stop quiet mode being enabled.
      Specified by:
      isDisableCvsQuiet in interface ICvs
      Overrides:
      isDisableCvsQuiet in class AbstractCvs
      Returns:
      whether to disable quiet mode or not.
    • isCleanOnFailedUpdate

      @Exported public boolean isCleanOnFailedUpdate()
      Description copied from interface: ICvs
      Allows cleaning of the workspace with a fresh checkout if CVS update fails.
      Specified by:
      isCleanOnFailedUpdate in interface ICvs
      Returns:
      whether to do a workspace wipe-out followed be CVS checkout if CVS update fails
    • isForceCleanCopy

      @Exported public boolean isForceCleanCopy()
      Description copied from interface: ICvs
      Controls whether CVS should apply the 'C' option to update commands to overwrite local changes.
      Specified by:
      isForceCleanCopy in interface ICvs
      Returns:
      whether CVS should over-write modifications to controlled files int he workspace during update
    • isLegacy

      public boolean isLegacy()
    • isCheckoutCurrentTimestamp

      @Exported public boolean isCheckoutCurrentTimestamp()
      Overrides:
      isCheckoutCurrentTimestamp in class AbstractCvs
    • buildEnvVars

      public void buildEnvVars(AbstractBuild<?,?> build, Map<String,String> env)
      Overrides:
      buildEnvVars in class SCM
    • checkout

      public boolean checkout(AbstractBuild<?,?> build, Launcher launcher, FilePath workspace, BuildListener listener, File changelogFile) throws IOException, InterruptedException
      Overrides:
      checkout in class SCM
      Throws:
      IOException
      InterruptedException
    • checkout

      public void checkout(@NonNull Run<?,?> build, @NonNull Launcher launcher, @NonNull FilePath workspace, @NonNull TaskListener listener, @CheckForNull File changelogFile, @CheckForNull SCMRevisionState baseline) throws IOException, InterruptedException
      Overrides:
      checkout in class SCM
      Throws:
      IOException
      InterruptedException
    • getDescriptor

      public CVSSCM.DescriptorImpl getDescriptor()
      Description copied from interface: ICvs
      Gets the descriptor for the current plugin.
      Specified by:
      getDescriptor in interface Describable<SCM>
      Specified by:
      getDescriptor in interface ICvs
      Overrides:
      getDescriptor in class AbstractCvs
      Returns:
      the current descriptor
      See Also: