hudson.scm
Class CVSSCM

java.lang.Object
  extended by hudson.scm.SCM
      extended by hudson.scm.CVSSCM
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.scm.SCM>, Serializable

public class CVSSCM
extends hudson.scm.SCM
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
See Also:
Serialized Form

Nested Class Summary
static class CVSSCM.DescriptorImpl
           
 class CVSSCM.TagAction
          Deprecated. this class was left for backward compatibility.
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
static boolean debug
          Temporary hack for assisting trouble-shooting.
static boolean noQuiet
           
static boolean skipChangeLog
          True to avoid computing the changelog.
 
Fields inherited from class hudson.scm.SCM
PERMISSIONS, TAG
 
Constructor Summary
CVSSCM(String cvsRoot, String allModules, String branch, String cvsRsh, boolean canUseUpdate, boolean legacy, boolean isTag, String excludedRegions)
           
 
Method Summary
 void buildEnvVars(hudson.model.AbstractBuild<?,?> build, Map<String,String> env)
           
 hudson.scm.SCMRevisionState calcRevisionsFromBuild(hudson.model.AbstractBuild<?,?> abstractBuild, hudson.Launcher launcher, hudson.model.TaskListener taskListener)
           
 boolean checkout(hudson.model.AbstractBuild build, hudson.Launcher launcher, hudson.FilePath ws, hudson.model.BuildListener listener, File changelogFile)
           
 boolean checkout(hudson.Launcher launcher, hudson.FilePath dir, hudson.model.TaskListener listener)
           
protected  hudson.scm.PollingResult compareRemoteRevisionWith(hudson.model.AbstractProject<?,?> project, hudson.Launcher launcher, hudson.FilePath workspace, hudson.model.TaskListener listener, hudson.scm.SCMRevisionState _baseline)
           
 hudson.scm.ChangeLogParser createChangeLogParser()
           
protected  Map<String,String> createEnvVarMap(boolean overrideOnly)
           
 String getAllModules()
           
 String[] getAllModulesNormalized()
          List up all modules to check out.
 String getBranch()
          Branch to build.
 CVSRepositoryBrowser getBrowser()
           
 boolean getCanUseUpdate()
           
 String getCvsRoot()
           
 String getCvsRsh()
           
 CVSSCM.DescriptorImpl getDescriptor()
           
 String getExcludedRegions()
           
 String[] getExcludedRegionsNormalized()
           
 hudson.FilePath getModuleRoot(hudson.FilePath workspace)
          If there are multiple modules, return the module directory of the first one.
 hudson.FilePath[] getModuleRoots(hudson.FilePath workspace)
           
 boolean isFlatten()
           
 boolean isLegacy()
           
 boolean isTag()
          Returns true if getBranch() represents a tag.
 boolean pollChanges(hudson.model.AbstractProject project, hudson.Launcher launcher, hudson.FilePath dir, hudson.model.TaskListener listener)
           
protected  boolean run(hudson.Launcher launcher, hudson.util.ArgumentListBuilder cmd, hudson.model.TaskListener listener, hudson.FilePath dir)
           
protected  boolean run(hudson.Launcher launcher, hudson.util.ArgumentListBuilder cmd, hudson.model.TaskListener listener, hudson.FilePath dir, OutputStream out)
          Invokes the command with the specified command line option and wait for its completion.
 
Methods inherited from class hudson.scm.SCM
_calcRevisionsFromBuild, _for, all, createEmptyChangeLog, getApi, getEffectiveBrowser, getModuleRoot, getModuleRoots, getType, nullify, poll, processWorkspaceBeforeDeletion, requiresWorkspaceForPolling, supportsPolling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public static boolean debug
Temporary hack for assisting trouble-shooting.

Setting this property to true would cause cvs log to dump a lot of messages.


noQuiet

public static boolean noQuiet

skipChangeLog

public static boolean skipChangeLog
True to avoid computing the changelog. Useful with ancient versions of CVS that doesn't support the -d option in the log command. See #1346.

Constructor Detail

CVSSCM

@DataBoundConstructor
public CVSSCM(String cvsRoot,
                                   String allModules,
                                   String branch,
                                   String cvsRsh,
                                   boolean canUseUpdate,
                                   boolean legacy,
                                   boolean isTag,
                                   String excludedRegions)
Method Detail

getBrowser

public CVSRepositoryBrowser getBrowser()
Overrides:
getBrowser in class hudson.scm.SCM

getCvsRoot

@Exported
public String getCvsRoot()

isTag

@Exported
public boolean isTag()
Returns true if getBranch() represents a tag.

This causes Hudson to stop using "-D" option while check out and update.


getModuleRoot

public hudson.FilePath getModuleRoot(hudson.FilePath workspace)
If there are multiple modules, return the module directory of the first one.

Overrides:
getModuleRoot in class hudson.scm.SCM
Parameters:
workspace -

getModuleRoots

public hudson.FilePath[] getModuleRoots(hudson.FilePath workspace)
Overrides:
getModuleRoots in class hudson.scm.SCM

createChangeLogParser

public hudson.scm.ChangeLogParser createChangeLogParser()
Specified by:
createChangeLogParser in class hudson.scm.SCM

getAllModules

@Exported
public String getAllModules()

getExcludedRegions

@Exported
public String getExcludedRegions()

getExcludedRegionsNormalized

public String[] getExcludedRegionsNormalized()

getAllModulesNormalized

public String[] getAllModulesNormalized()
List up all modules to check out.


getBranch

@Exported
public String getBranch()
Branch to build. Null to indicate the trunk.


getCvsRsh

@Exported
public String getCvsRsh()

getCanUseUpdate

@Exported
public boolean getCanUseUpdate()

isFlatten

@Exported
public boolean isFlatten()

isLegacy

public boolean isLegacy()

pollChanges

public boolean pollChanges(hudson.model.AbstractProject project,
                           hudson.Launcher launcher,
                           hudson.FilePath dir,
                           hudson.model.TaskListener listener)
                    throws IOException,
                           InterruptedException
Overrides:
pollChanges in class hudson.scm.SCM
Throws:
IOException
InterruptedException

checkout

public boolean checkout(hudson.model.AbstractBuild build,
                        hudson.Launcher launcher,
                        hudson.FilePath ws,
                        hudson.model.BuildListener listener,
                        File changelogFile)
                 throws IOException,
                        InterruptedException
Specified by:
checkout in class hudson.scm.SCM
Throws:
IOException
InterruptedException

checkout

public boolean checkout(hudson.Launcher launcher,
                        hudson.FilePath dir,
                        hudson.model.TaskListener listener)
                 throws IOException,
                        InterruptedException
Throws:
IOException
InterruptedException

calcRevisionsFromBuild

public hudson.scm.SCMRevisionState calcRevisionsFromBuild(hudson.model.AbstractBuild<?,?> abstractBuild,
                                                          hudson.Launcher launcher,
                                                          hudson.model.TaskListener taskListener)
                                                   throws IOException,
                                                          InterruptedException
Specified by:
calcRevisionsFromBuild in class hudson.scm.SCM
Throws:
IOException
InterruptedException

getDescriptor

public CVSSCM.DescriptorImpl getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<hudson.scm.SCM>
Overrides:
getDescriptor in class hudson.scm.SCM

buildEnvVars

public void buildEnvVars(hudson.model.AbstractBuild<?,?> build,
                         Map<String,String> env)
Overrides:
buildEnvVars in class hudson.scm.SCM

run

protected final boolean run(hudson.Launcher launcher,
                            hudson.util.ArgumentListBuilder cmd,
                            hudson.model.TaskListener listener,
                            hudson.FilePath dir,
                            OutputStream out)
                     throws IOException,
                            InterruptedException
Invokes the command with the specified command line option and wait for its completion.

Parameters:
dir - if launching locally this is a local path, otherwise a remote path.
out - Receives output from the executed program.
Throws:
IOException
InterruptedException

run

protected final boolean run(hudson.Launcher launcher,
                            hudson.util.ArgumentListBuilder cmd,
                            hudson.model.TaskListener listener,
                            hudson.FilePath dir)
                     throws IOException,
                            InterruptedException
Throws:
IOException
InterruptedException

createEnvVarMap

protected final Map<String,String> createEnvVarMap(boolean overrideOnly)
Parameters:
overrideOnly - true to indicate that the returned map shall only contain properties that need to be overridden. This is for use with Launcher. false to indicate that the map should contain complete map. This is to invoke Proc directly.

compareRemoteRevisionWith

protected hudson.scm.PollingResult compareRemoteRevisionWith(hudson.model.AbstractProject<?,?> project,
                                                             hudson.Launcher launcher,
                                                             hudson.FilePath workspace,
                                                             hudson.model.TaskListener listener,
                                                             hudson.scm.SCMRevisionState _baseline)
                                                      throws IOException,
                                                             InterruptedException
Specified by:
compareRemoteRevisionWith in class hudson.scm.SCM
Throws:
IOException
InterruptedException


Copyright © 2004-2011 Hudson. All Rights Reserved.