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>, java.io.Serializable

public class CVSSCM
extends hudson.scm.SCM
implements java.io.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
          Action for a build that performs the tagging.
static class CVSSCM.TagActionDescriptor
           
static class CVSSCM.TagWorkerThread
           
 
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(java.lang.String cvsRoot, java.lang.String allModules, java.lang.String branch, java.lang.String cvsRsh, boolean canUseUpdate, boolean legacy, boolean isTag, java.lang.String excludedRegions)
           
 
Method Summary
 void buildEnvVars(hudson.model.AbstractBuild build, java.util.Map<java.lang.String,java.lang.String> env)
           
 boolean checkout(hudson.model.AbstractBuild build, hudson.Launcher launcher, hudson.FilePath ws, hudson.model.BuildListener listener, java.io.File changelogFile)
           
 boolean checkout(hudson.Launcher launcher, hudson.FilePath dir, hudson.model.TaskListener listener)
           
 hudson.scm.ChangeLogParser createChangeLogParser()
           
protected  java.util.Map<java.lang.String,java.lang.String> createEnvVarMap(boolean overrideOnly)
           
 java.lang.String getAllModules()
           
 java.lang.String[] getAllModulesNormalized()
          List up all modules to check out.
 java.lang.String getBranch()
          Branch to build.
 CVSRepositoryBrowser getBrowser()
           
 boolean getCanUseUpdate()
           
 java.lang.String getCvsRoot()
           
 java.lang.String getCvsRsh()
           
 CVSSCM.DescriptorImpl getDescriptor()
           
 java.lang.String getExcludedRegions()
           
 java.lang.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, java.io.OutputStream out)
          Invokes the command with the specified command line option and wait for its completion.
 
Methods inherited from class hudson.scm.SCM
_for, all, createEmptyChangeLog, getApi, getEffectiveBrowser, getType, nullify, 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(java.lang.String cvsRoot,
                                   java.lang.String allModules,
                                   java.lang.String branch,
                                   java.lang.String cvsRsh,
                                   boolean canUseUpdate,
                                   boolean legacy,
                                   boolean isTag,
                                   java.lang.String excludedRegions)
Method Detail

getBrowser

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

getCvsRoot

@Exported
public java.lang.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 java.lang.String getAllModules()

getExcludedRegions

@Exported
public java.lang.String getExcludedRegions()

getExcludedRegionsNormalized

public java.lang.String[] getExcludedRegionsNormalized()

getAllModulesNormalized

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


getBranch

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


getCvsRsh

@Exported
public java.lang.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 java.io.IOException,
                           java.lang.InterruptedException
Specified by:
pollChanges in class hudson.scm.SCM
Throws:
java.io.IOException
java.lang.InterruptedException

checkout

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

checkout

public boolean checkout(hudson.Launcher launcher,
                        hudson.FilePath dir,
                        hudson.model.TaskListener listener)
                 throws java.io.IOException,
                        java.lang.InterruptedException
Throws:
java.io.IOException
java.lang.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,
                         java.util.Map<java.lang.String,java.lang.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,
                            java.io.OutputStream out)
                     throws java.io.IOException,
                            java.lang.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:
java.io.IOException
java.lang.InterruptedException

run

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

createEnvVarMap

protected final java.util.Map<java.lang.String,java.lang.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.


Copyright © 2010. All Rights Reserved.