Package hudson.scm
Class AbstractCvs
java.lang.Object
hudson.scm.SCM
hudson.scm.AbstractCvs
- All Implemented Interfaces:
ExtensionPoint
,Describable<SCM>
,ICvs
,Serializable
- Direct Known Subclasses:
CvsProjectset
,CVSSCM
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class hudson.scm.SCM
PERMISSIONS, TAG
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncalcRevisionsFromBuild
(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener) Since we add the current SCMRevisionState as an action during the build (so we can get the current workspace state), this method should never be called.calcRevisionsFromBuild
(Run<?, ?> build, FilePath workspace, Launcher launcher, TaskListener listener) protected List<CVSChangeLogSet.CVSChangeLog>
calculateChangeLog
(Date startTime, Date endTime, CvsRepository repository, TaskListener listener, EnvVars envVars, FilePath workspace) Builds a list of changes that have occurred in the given repository between any 2 time-stamps.calculateRepositoryState
(Date startTime, Date endTime, CvsRepository repository, TaskListener listener, EnvVars envVars, FilePath workspace) Builds a list of files that have changed in the given repository between any 2 time-stamps.protected boolean
checkout
(CvsRepository[] repositories, boolean isFlatten, FilePath workspace, boolean canUseUpdate, Run<?, ?> build, String dateStamp, boolean pruneEmptyDirectories, boolean cleanOnFailedUpdate, TaskListener listener) protected PollingResult
compareRemoteRevisionWith
(AbstractProject<?, ?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline, CvsRepository[] repositories) protected Date
getCheckoutDate
(Run<?, ?> build) org.netbeans.lib.cvsclient.Client
getCvsClient
(CvsRepository repository, EnvVars envVars, TaskListener listener) Gets an instance of the CVS client that can be used for connection to a repository.org.netbeans.lib.cvsclient.Client
getCvsClient
(CvsRepository repository, EnvVars envVars, TaskListener listener, boolean showAuthenticationInfo) Gets an instance of the CVS client that can be used for connection to a repository.Gets the descriptor for the current plugin.org.netbeans.lib.cvsclient.command.GlobalOptions
getGlobalOptions
(CvsRepository repository, EnvVars envVars) boolean
boolean
CVS is normally run in quiet mode to reduce un-needed log output.static boolean
isSymLink
(File file, TaskListener listener) Check if the given file is a symbolic link.protected void
postCheckout
(Run<?, ?> build, File changelogFile, CvsRepository[] repositories, FilePath workspace, TaskListener listener, boolean flatten, EnvVars envVars) Methods inherited from class hudson.scm.SCM
_calcRevisionsFromBuild, _for, _for, all, buildEnvironment, buildEnvVars, checkout, checkout, compareRemoteRevisionWith, compareRemoteRevisionWith, createEmptyChangeLog, createEmptyChangeLog, getApi, getBrowser, getEffectiveBrowser, getKey, getModuleRoot, getModuleRoot, getModuleRoots, getModuleRoots, getType, guessBrowser, nullify, poll, pollChanges, postCheckout, postCheckout, processWorkspaceBeforeDeletion, processWorkspaceBeforeDeletion, requiresWorkspaceForPolling, supportsPolling
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface hudson.scm.ICvs
getRepositories, isCanUseUpdate, isCleanOnFailedUpdate, isFlatten, isForceCleanCopy, isPruneEmptyDirectories, isSkipChangeLog
-
Field Details
-
DATE_FORMATTER
-
-
Constructor Details
-
AbstractCvs
public AbstractCvs()
-
-
Method Details
-
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 classSCM
- Returns:
- the current descriptor
- See Also:
-
isCheckoutCurrentTimestamp
public boolean isCheckoutCurrentTimestamp() -
checkout
protected boolean checkout(CvsRepository[] repositories, boolean isFlatten, FilePath workspace, boolean canUseUpdate, Run<?, ?> build, String dateStamp, boolean pruneEmptyDirectories, boolean cleanOnFailedUpdate, TaskListener listener) throws IOException, InterruptedException- Throws:
IOException
InterruptedException
-
getCvsClient
public org.netbeans.lib.cvsclient.Client getCvsClient(CvsRepository repository, EnvVars envVars, TaskListener listener) Gets an instance of the CVS client that can be used for connection to a repository. If the repository specifies a password then the client's connection will be set with this password.- Parameters:
repository
- the repository to connect toenvVars
- variables to use for macro expansion- Returns:
- a CVS client capable of connecting to the specified repository
-
getCvsClient
public org.netbeans.lib.cvsclient.Client getCvsClient(CvsRepository repository, EnvVars envVars, TaskListener listener, boolean showAuthenticationInfo) Gets an instance of the CVS client that can be used for connection to a repository. If the repository specifies a password then the client's connection will be set with this password.- Parameters:
repository
- the repository to connect toenvVars
- variables to use for macro expansionshowAuthenticationInfo
- whether to log where the authentication details are being obtanied from- Returns:
- a CVS client capable of connecting to the specified repository
-
getGlobalOptions
public org.netbeans.lib.cvsclient.command.GlobalOptions getGlobalOptions(CvsRepository repository, EnvVars envVars) -
isDisableCvsQuiet
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
- Returns:
- whether to disable quiet mode or not.
-
calcRevisionsFromBuild
public SCMRevisionState calcRevisionsFromBuild(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedExceptionSince we add the current SCMRevisionState as an action during the build (so we can get the current workspace state), this method should never be called. Just for safety, we get the action and return it.- Overrides:
calcRevisionsFromBuild
in classSCM
- Throws:
IOException
InterruptedException
- See Also:
-
calcRevisionsFromBuild
@CheckForNull public SCMRevisionState calcRevisionsFromBuild(@NonNull Run<?, ?> build, @Nullable FilePath workspace, @Nullable Launcher launcher, @NonNull TaskListener listener) throws IOException, InterruptedException- Overrides:
calcRevisionsFromBuild
in classSCM
- Throws:
IOException
InterruptedException
-
compareRemoteRevisionWith
protected PollingResult compareRemoteRevisionWith(AbstractProject<?, ?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline, CvsRepository[] repositories) throws IOException, InterruptedException- Throws:
IOException
InterruptedException
-
calculateRepositoryState
protected List<CvsFile> calculateRepositoryState(Date startTime, Date endTime, CvsRepository repository, TaskListener listener, EnvVars envVars, FilePath workspace) throws IOException, InterruptedException Builds a list of files that have changed in the given repository between any 2 time-stamps. This does not require the workspace to be checked out and does not change the state of any checked out workspace. The list returned does not have any filters set for exclude regions (i.e. it's every file that's changed for the modules being watched).- Parameters:
startTime
- the time-stamp to start filtering changes fromendTime
- the time-stamp to end filtering changes fromrepository
- the repository to search for changes in. All modules under this repository will be checkedlistener
- where to send log outputenvVars
- the environmental variables to perform parameter expansion from- Returns:
- a list of changed files, including their versions and change comments
- Throws:
IOException
- on communication failure (e.g. communication with slaves)InterruptedException
-
calculateChangeLog
protected List<CVSChangeLogSet.CVSChangeLog> calculateChangeLog(Date startTime, Date endTime, CvsRepository repository, TaskListener listener, EnvVars envVars, FilePath workspace) throws IOException, InterruptedException Builds a list of changes that have occurred in the given repository between any 2 time-stamps. This does not require the workspace to be checked out and does not change the state of any checked out workspace. The list returned does not have any filters set for exclude regions (i.e. it's every file that's changed for the modules being watched).- Parameters:
startTime
- the time-stamp to start filtering changes fromendTime
- the time-stamp to end filtering changes fromrepository
- the repository to search for changes in. All modules under this repository will be checkedlistener
- where to send log outputenvVars
- the environmental variables to perform parameter expansion from.- Returns:
- a list of changed files, including their versions and change comments
- Throws:
IOException
- on communication failure (e.g. communication with slaves)InterruptedException
- on job cancellation
-
postCheckout
protected void postCheckout(Run<?, ?> build, File changelogFile, CvsRepository[] repositories, FilePath workspace, TaskListener listener, boolean flatten, EnvVars envVars) throws IOException, InterruptedException- Throws:
IOException
InterruptedException
-
getCheckoutDate
-
isSymLink
Check if the given file is a symbolic link. Useful for preventing CSV recursing into directories infinitely.- Parameters:
file
- name of the file to test- Returns:
- whether the file if believed to be a symlink or not
-
createChangeLogParser
- Specified by:
createChangeLogParser
in classSCM
-