hudson.plugins.perforce
Class PerforceSCM
java.lang.Object
hudson.scm.SCM
hudson.plugins.perforce.PerforceSCM
- All Implemented Interfaces:
- hudson.ExtensionPoint, hudson.model.Describable<hudson.scm.SCM>
public class PerforceSCM
- extends hudson.scm.SCM
Extends SCM to provide integration with Perforce SCM repositories.
- Author:
- Mike Wille, Brian Westrich
|
Constructor Summary |
PerforceSCM(java.lang.String p4User,
java.lang.String p4Pass,
java.lang.String p4Client,
java.lang.String p4Port,
java.lang.String projectPath,
java.lang.String p4Exe,
java.lang.String p4SysRoot,
java.lang.String p4SysDrive,
boolean forceSync,
boolean updateView,
int firstChange,
PerforceRepositoryBrowser browser)
|
| Methods inherited from class hudson.scm.SCM |
buildEnvVars, createEmptyChangeLog, getEffectiveBrowser, getModuleRoot, getModuleRoots, nullify, supportsPolling |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DESCRIPTOR
public static final PerforceSCM.PerforceSCMDescriptor DESCRIPTOR
PerforceSCM
public PerforceSCM(java.lang.String p4User,
java.lang.String p4Pass,
java.lang.String p4Client,
java.lang.String p4Port,
java.lang.String projectPath,
java.lang.String p4Exe,
java.lang.String p4SysRoot,
java.lang.String p4SysDrive,
boolean forceSync,
boolean updateView,
int firstChange,
PerforceRepositoryBrowser browser)
checkout
public boolean checkout(hudson.model.AbstractBuild build,
hudson.Launcher launcher,
hudson.FilePath workspace,
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
getBrowser
public PerforceRepositoryBrowser getBrowser()
- Overrides:
getBrowser in class hudson.scm.SCM
createChangeLogParser
public hudson.scm.ChangeLogParser createChangeLogParser()
- Specified by:
createChangeLogParser in class hudson.scm.SCM
getDescriptor
public hudson.scm.SCMDescriptor<?> getDescriptor()
- Specified by:
getDescriptor in interface hudson.model.Describable<hudson.scm.SCM>- Overrides:
getDescriptor in class hudson.scm.SCM
pollChanges
public boolean pollChanges(hudson.model.AbstractProject project,
hudson.Launcher launcher,
hudson.FilePath workspace,
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
getLastChange
public int getLastChange(hudson.model.Run build)
getProjectPath
public java.lang.String getProjectPath()
- Returns:
- the projectPath
setProjectPath
public void setProjectPath(java.lang.String projectPath)
- Parameters:
projectPath - the projectPath to set
getP4User
public java.lang.String getP4User()
- Returns:
- the p4User
setP4User
public void setP4User(java.lang.String user)
- Parameters:
user - the p4User to set
getP4Passwd
public java.lang.String getP4Passwd()
- Returns:
- the p4Passwd
setP4Passwd
public void setP4Passwd(java.lang.String passwd)
- Parameters:
passwd - the p4Passwd to set
getP4Port
public java.lang.String getP4Port()
- Returns:
- the p4Port
setP4Port
public void setP4Port(java.lang.String port)
- Parameters:
port - the p4Port to set
getP4Client
public java.lang.String getP4Client()
- Returns:
- the p4Client
setP4Client
public void setP4Client(java.lang.String client)
- Parameters:
client - the p4Client to set
getP4SysDrive
public java.lang.String getP4SysDrive()
- Returns:
- the p4SysDrive
setP4SysDrive
public void setP4SysDrive(java.lang.String sysDrive)
- Parameters:
sysDrive - the p4SysDrive to set
getP4SysRoot
public java.lang.String getP4SysRoot()
- Returns:
- the p4SysRoot
setP4SysRoot
public void setP4SysRoot(java.lang.String sysRoot)
- Parameters:
sysRoot - the p4SysRoot to set
getP4Exe
public java.lang.String getP4Exe()
- Returns:
- the p4Exe
setP4Exe
public void setP4Exe(java.lang.String exe)
- Parameters:
exe - the p4Exe to set
setUpdateView
public void setUpdateView(boolean update)
- Parameters:
update - True to let the plugin manage the view, false to let the user manage it
isUpdateView
public boolean isUpdateView()
- Returns:
- True if the plugin manages the view, false if the user does.
isForceSync
public boolean isForceSync()
- Returns:
- True if we are performing a one-time force sync
setForceSync
public void setForceSync(boolean force)
- Parameters:
force - True to perform a one time force sync, false to perform normal sync
getFirstChange
public java.lang.String getFirstChange()
- This is only for the config screen. Also, it returns a string and not an int.
This is because we want to show an empty value in the config option if it is not being
used. The default value of -1 is not exactly empty. So if we are set to default of
-1, we return an empty string. Anything else and we return the actual change number.
- Returns:
- The one time use variable, firstChange.
Copyright © 2007. All Rights Reserved.