Package hudson.scm
Class CVSSCM
java.lang.Object
hudson.scm.SCM
hudson.scm.AbstractCvs
hudson.scm.CVSSCM
- All Implemented Interfaces:
ExtensionPoint
,Describable<SCM>
,ICvs
,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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
final class
Deprecated.we now use CvsTagAction but have to keep this class around for old builds that have a serialized version of this class and use the old archive method of tagging a buildNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class hudson.scm.AbstractCvs
DATE_FORMATTER
Fields inherited from class hudson.scm.SCM
PERMISSIONS, TAG
-
Constructor Summary
ConstructorDescriptionCVSSCM
(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 cvsRshCVSSCM
(String cvsRoot, String allModules, String branch, String cvsRsh, boolean canUseUpdate, boolean useHeadIfNotFound, boolean legacy, boolean isTag, String excludedRegions, CVSRepositoryBrowser browser) Deprecated.CVSSCM
(List<CvsRepository> repositories, boolean canUseUpdate, boolean legacy, boolean skipChangeLog, boolean pruneEmptyDirectories, boolean disableCvsQuiet, boolean cleanOnFailedUpdate, boolean forceCleanCopy) Deprecated.CVSSCM
(List<CvsRepository> repositories, boolean canUseUpdate, boolean legacy, boolean skipChangeLog, boolean pruneEmptyDirectories, boolean disableCvsQuiet, boolean cleanOnFailedUpdate, boolean forceCleanCopy, boolean checkoutCurrentTimestamp) -
Method Summary
Modifier and TypeMethodDescriptionvoid
buildEnvVars
(AbstractBuild<?, ?> build, Map<String, String> env) boolean
checkout
(AbstractBuild<?, ?> build, Launcher launcher, FilePath workspace, BuildListener listener, File changelogFile) void
checkout
(Run<?, ?> build, Launcher launcher, FilePath workspace, TaskListener listener, File changelogFile, SCMRevisionState baseline) protected PollingResult
compareRemoteRevisionWith
(AbstractProject<?, ?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline) Checks for differences between the current workspace and the remote repository.Gets the descriptor for the current plugin.getModuleRoot
(FilePath workspace, AbstractBuild build) If there are multiple modules, return the module directory of the first one.FilePath[]
getModuleRoots
(FilePath workspace, AbstractBuild build) Gets the repositories currently configured for this job.boolean
Whether CVS update can be used in place of CVS checkout if a workspace is already checked out.boolean
boolean
Allows cleaning of the workspace with a fresh checkout if CVS update fails.boolean
CVS is normally run in quiet mode to reduce un-needed log output.boolean
Whether to checkout an individual module's files directly into the workspace root rather than into a subdirectory of the module name.boolean
Controls whether CVS should apply the 'C' option to update commands to overwrite local changes.boolean
isLegacy()
boolean
Whether CVS should be instructed to remove empty directories as part of checkout/update.boolean
Allows the option of skipping the changelog generation after checkout.final Object
Convert legacy configuration into the new class structure.boolean
Methods inherited from class hudson.scm.AbstractCvs
calcRevisionsFromBuild, calcRevisionsFromBuild, calculateChangeLog, calculateRepositoryState, checkout, compareRemoteRevisionWith, createChangeLogParser, getCheckoutDate, getCvsClient, getCvsClient, getGlobalOptions, isSymLink, postCheckout
Methods inherited from class hudson.scm.SCM
_calcRevisionsFromBuild, _for, _for, all, buildEnvironment, compareRemoteRevisionWith, createEmptyChangeLog, createEmptyChangeLog, getApi, getEffectiveBrowser, getKey, getModuleRoot, getModuleRoots, getType, guessBrowser, nullify, poll, pollChanges, postCheckout, postCheckout, processWorkspaceBeforeDeletion, processWorkspaceBeforeDeletion, supportsPolling
-
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
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
Gets the repositories currently configured for this job.- Specified by:
getRepositories
in interfaceICvs
- Returns:
- an array of
CvsRepository
-
getBrowser
- Overrides:
getBrowser
in classSCM
-
requiresWorkspaceForPolling
public boolean requiresWorkspaceForPolling()- Overrides:
requiresWorkspaceForPolling
in classSCM
-
compareRemoteRevisionWith
protected PollingResult compareRemoteRevisionWith(AbstractProject<?, ?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline) throws IOException, InterruptedExceptionChecks for differences between the current workspace and the remote repository.- Overrides:
compareRemoteRevisionWith
in classSCM
- Throws:
IOException
InterruptedException
- See Also:
-
getModuleRoot
If there are multiple modules, return the module directory of the first one.- Overrides:
getModuleRoot
in classSCM
- Parameters:
workspace
-
-
getModuleRoots
- Overrides:
getModuleRoots
in classSCM
-
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 interfaceICvs
- Returns:
- true is the
cvs up
can be used in place ofcvs 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 interfaceICvs
- 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 interfaceICvs
- 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) -
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 interfaceICvs
- Overrides:
isDisableCvsQuiet
in classAbstractCvs
- 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 interfaceICvs
- 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 interfaceICvs
- 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 classAbstractCvs
-
buildEnvVars
- Overrides:
buildEnvVars
in classSCM
-
checkout
public boolean checkout(AbstractBuild<?, ?> build, Launcher launcher, FilePath workspace, BuildListener listener, File changelogFile) throws IOException, InterruptedException- Overrides:
checkout
in classSCM
- 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 classSCM
- Throws:
IOException
InterruptedException
-
getDescriptor
Description copied from interface:ICvs
Gets the descriptor for the current plugin.- Specified by:
getDescriptor
in interfaceDescribable<SCM>
- Specified by:
getDescriptor
in interfaceICvs
- Overrides:
getDescriptor
in classAbstractCvs
- Returns:
- the current descriptor
- See Also:
-