|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.scm.SCM
hudson.plugins.perforce.PerforceSCM
public class PerforceSCM
Extends SCM to provide integration with Perforce SCM repositories.
| Nested Class Summary | |
|---|---|
static class |
PerforceSCM.PerforceSCMDescriptor
|
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
|---|
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Field Summary |
|---|
| Fields inherited from class hudson.scm.SCM |
|---|
PERMISSIONS, TAG |
| Constructor Summary | |
|---|---|
PerforceSCM(String p4User,
String p4Passwd,
String p4Client,
String p4Port,
String projectOptions,
String p4Tool,
String p4SysRoot,
String p4SysDrive,
String p4Label,
String p4Counter,
String p4UpstreamProject,
String lineEndValue,
String p4Charset,
String p4CommandCharset,
String clientOwner,
boolean updateCounterValue,
boolean forceSync,
boolean dontUpdateServer,
boolean alwaysForceSync,
boolean createWorkspace,
boolean updateView,
boolean disableAutoSync,
boolean disableSyncOnly,
boolean showIntegChanges,
boolean dontUpdateClient,
boolean exposeP4Passwd,
boolean pollOnlyOnMaster,
String slaveClientNameFormat,
int firstChange,
int fileLimit,
PerforceRepositoryBrowser browser,
String excludedUsers,
String excludedFiles,
boolean excludedFilesCaseSensitivity)
|
|
| Method Summary | |
|---|---|
void |
buildEnvVars(hudson.model.AbstractBuild<?,?> build,
Map<String,String> env)
Override of SCM.buildEnvVars() in order to setup the last change we have sync'd to as a Hudson environment variable: P4_CHANGELIST |
hudson.scm.SCMRevisionState |
calcRevisionsFromBuild(hudson.model.AbstractBuild<?,?> ab,
hudson.Launcher lnchr,
hudson.model.TaskListener tl)
Part of the new polling routines. |
boolean |
checkout(hudson.model.AbstractBuild build,
hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.BuildListener listener,
File changelogFile)
|
protected hudson.scm.PollingResult |
compareRemoteRevisionWith(hudson.model.AbstractProject<?,?> project,
hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.TaskListener listener,
hudson.scm.SCMRevisionState scmrs)
Part of the new polling routines. |
hudson.scm.ChangeLogParser |
createChangeLogParser()
|
static boolean |
doesFilenameMatchP4Pattern(String filename,
String patternString,
boolean caseSensitive)
|
static String |
escapeP4String(String string)
|
List<String> |
getAllLineEndChoices()
|
PerforceRepositoryBrowser |
getBrowser()
|
String |
getClientSpec()
|
String |
getDecryptedP4Passwd()
|
String |
getDecryptedP4Passwd(hudson.model.AbstractBuild build)
|
String |
getDecryptedP4Passwd(hudson.model.AbstractProject project)
|
protected Depot |
getDepot(hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.AbstractProject project,
hudson.model.AbstractBuild build,
hudson.model.Node node)
This only exists because we need to do initialization after we have been brought back to life. |
String |
getExcludedFiles()
|
boolean |
getExcludedFilesCaseSensitivity()
|
String |
getExcludedUsers()
|
String |
getFileLimit()
This is only for the config screen. |
String |
getFirstChange()
This is only for the config screen. |
int |
getLastChange(hudson.model.Run build)
|
String |
getLineEndValue()
|
String |
getP4Charset()
|
String |
getP4Client()
|
String |
getP4CommandCharset()
|
String |
getP4Counter()
|
String |
getP4Exe()
Deprecated. Replaced by getP4Tool() |
String |
getP4Executable(String tool)
Get the path to p4 executable from a Perforce tool installation. |
String |
getP4Executable(String tool,
hudson.model.Node node,
hudson.model.TaskListener listener)
|
String |
getP4Label()
|
String |
getP4Passwd()
|
String |
getP4Port()
|
String |
getP4Stream()
Get the stream name. |
String |
getP4SysDrive()
|
String |
getP4SysRoot()
|
String |
getP4Tool()
|
PerforceToolInstallation |
getP4Tool(String tool)
Get the path to p4 executable from a Perforce tool installation. |
String |
getP4UpstreamProject()
|
String |
getP4User()
|
String |
getProjectOptions()
The current perforce option set for the view. |
String |
getProjectPath()
|
String |
getSlaveClientNameFormat()
|
String |
getViewMask()
|
boolean |
isAlwaysForceSync()
|
boolean |
isCleanWorkspaceBeforeBuild()
|
boolean |
isCreateWorkspace()
|
boolean |
isDisableAutoSync()
|
boolean |
isDisableSyncOnly()
|
boolean |
isDontRenameClient()
|
boolean |
isDontUpdateClient()
|
boolean |
isDontUpdateServer()
|
boolean |
isExposeP4Passwd()
|
static boolean |
isFileInView(String filename,
String projectPath,
boolean caseSensitive)
|
boolean |
isForceSync()
|
boolean |
isPollOnlyOnMaster()
|
boolean |
isQuickCleanBeforeBuild()
|
boolean |
isRestoreChangedDeletedFiles()
|
boolean |
isShowIntegChanges()
|
boolean |
isSlaveClientNameStatic()
|
boolean |
isUpdateCounterValue()
|
boolean |
isUpdateView()
|
boolean |
isUseClientSpec()
|
boolean |
isUseLabel()
|
boolean |
isUseOldClientName()
|
boolean |
isUseStreamDepot()
Check if we are using a stream depot type or a classic depot type. |
boolean |
isUseViewMask()
|
boolean |
isUseViewMaskForPolling()
|
boolean |
isUseViewMaskForSyncing()
|
boolean |
isWipeBeforeBuild()
|
boolean |
isWipeRepoBeforeBuild()
|
static List<String> |
parseProjectPath(String projectPath,
String p4Client)
Parses the projectPath into a list of pairs of strings representing the depot and client paths. |
static List<String> |
parseProjectPath(String projectPath,
String p4Client,
PrintStream log)
|
static String |
processPathName(String path,
boolean isUnix)
|
boolean |
processWorkspaceBeforeDeletion(hudson.model.AbstractProject<?,?> project,
hudson.FilePath workspace,
hudson.model.Node node)
With Perforce the server keeps track of files in the workspace. |
Object |
readResolve()
Use the old job configuration data. |
boolean |
requiresWorkspaceForPolling()
|
void |
setAlwaysForceSync(boolean force)
|
void |
setClientSpec(String clientSpec)
|
void |
setCreateWorkspace(boolean val)
|
void |
setDisableAutoSync(boolean disable)
|
void |
setDisableSyncOnly(boolean disableSyncOnly)
|
void |
setDontRenameClient(boolean dontRenameClient)
|
void |
setDontUpdateClient(boolean dontUpdateClient)
|
void |
setDontUpdateServer(boolean dontUpdateServer)
|
void |
setExcludedFiles(String files)
|
void |
setExcludedFilesCaseSensitivity(boolean excludedFilesCaseSensitivity)
|
void |
setExcludedUsers(String users)
|
void |
setExposeP4Passwd(boolean exposeP4Passwd)
|
void |
setFileLimit(int fileLimit)
|
void |
setForceSync(boolean force)
|
void |
setLineEndValue(String lineEndValue)
|
void |
setP4Charset(String p4Charset)
|
void |
setP4Client(String client)
|
void |
setP4CommandCharset(String p4CommandCharset)
|
void |
setP4Counter(String counter)
|
void |
setP4Exe(String exe)
Deprecated. Replaced by setP4Tool(String) |
void |
setP4Label(String label)
|
void |
setP4Passwd(String passwd)
|
void |
setP4Port(String port)
|
void |
setP4Stream(String stream)
Set the stream name. |
void |
setP4SysDrive(String sysDrive)
|
void |
setP4SysRoot(String sysRoot)
|
void |
setP4Tool(String tool)
|
void |
setP4UpstreamProject(String project)
|
void |
setP4User(String user)
|
void |
setPollOnlyOnMaster(boolean pollOnlyOnMaster)
|
void |
setProjectOptions(String projectOptions)
Set the perforce options for view creation. |
void |
setProjectPath(String projectPath)
|
void |
setQuickCleanBeforeBuild(boolean quickCleanBeforeBuild)
|
void |
setRestoreChangedDeletedFiles(boolean restoreChangedDeletedFiles)
|
void |
setShowIntegChanges(boolean showIntegChanges)
|
void |
setSlaveClientNameFormat(String clientFormat)
|
void |
setUpdateCounterValue(boolean updateCounterValue)
|
void |
setUpdateView(boolean update)
|
void |
setUseClientSpec(boolean useClientSpec)
|
void |
setUseOldClientName(boolean use)
|
void |
setUseStreamDepot(boolean useStreamDepot)
Control the usage of stream depot. |
void |
setUseViewMask(boolean useViewMask)
|
void |
setUseViewMaskForPolling(boolean useViewMaskForPolling)
|
void |
setUseViewMaskForSyncing(boolean useViewMaskForSyncing)
|
void |
setViewMask(String viewMask)
|
void |
setWipeBeforeBuild(boolean wipeBeforeBuild)
|
void |
setWipeRepoBeforeBuild(boolean wipeRepoBeforeBuild)
|
boolean |
supportsPolling()
|
static String |
unescapeP4String(String string)
|
| Methods inherited from class hudson.scm.SCM |
|---|
_calcRevisionsFromBuild, _for, all, createEmptyChangeLog, getApi, getDescriptor, getEffectiveBrowser, getModuleRoot, getModuleRoot, getModuleRoots, getModuleRoots, getType, nullify, poll, pollChanges |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@DataBoundConstructor
public PerforceSCM(String p4User,
String p4Passwd,
String p4Client,
String p4Port,
String projectOptions,
String p4Tool,
String p4SysRoot,
String p4SysDrive,
String p4Label,
String p4Counter,
String p4UpstreamProject,
String lineEndValue,
String p4Charset,
String p4CommandCharset,
String clientOwner,
boolean updateCounterValue,
boolean forceSync,
boolean dontUpdateServer,
boolean alwaysForceSync,
boolean createWorkspace,
boolean updateView,
boolean disableAutoSync,
boolean disableSyncOnly,
boolean showIntegChanges,
boolean dontUpdateClient,
boolean exposeP4Passwd,
boolean pollOnlyOnMaster,
String slaveClientNameFormat,
int firstChange,
int fileLimit,
PerforceRepositoryBrowser browser,
String excludedUsers,
String excludedFiles,
boolean excludedFilesCaseSensitivity)
| Method Detail |
|---|
protected Depot getDepot(hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.AbstractProject project,
hudson.model.AbstractBuild build,
hudson.model.Node node)
node - the value of node
public void buildEnvVars(hudson.model.AbstractBuild<?,?> build,
Map<String,String> env)
buildEnvVars in class hudson.scm.SCMbuild - env - public String getP4Executable(String tool)
tool - the p4 tool installation name
public String getP4Executable(String tool,
hudson.model.Node node,
hudson.model.TaskListener listener)
public PerforceToolInstallation getP4Tool(String tool)
tool - the p4 tool installation name
public Object readResolve()
public static String processPathName(String path,
boolean isUnix)
public static boolean isFileInView(String filename,
String projectPath,
boolean caseSensitive)
public boolean checkout(hudson.model.AbstractBuild build,
hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.BuildListener listener,
File changelogFile)
throws IOException,
InterruptedException
checkout in class hudson.scm.SCMIOException
InterruptedExceptionpublic PerforceRepositoryBrowser getBrowser()
getBrowser in class hudson.scm.SCMpublic hudson.scm.ChangeLogParser createChangeLogParser()
createChangeLogParser in class hudson.scm.SCM
public hudson.scm.SCMRevisionState calcRevisionsFromBuild(hudson.model.AbstractBuild<?,?> ab,
hudson.Launcher lnchr,
hudson.model.TaskListener tl)
throws IOException,
InterruptedException
calcRevisionsFromBuild in class hudson.scm.SCMab - lnchr - tl -
IOException
InterruptedException
protected hudson.scm.PollingResult compareRemoteRevisionWith(hudson.model.AbstractProject<?,?> project,
hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.TaskListener listener,
hudson.scm.SCMRevisionState scmrs)
throws IOException,
InterruptedException
compareRemoteRevisionWith in class hudson.scm.SCMap - lnchr - fp - tl - scmrs -
IOException
InterruptedException
public static boolean doesFilenameMatchP4Pattern(String filename,
String patternString,
boolean caseSensitive)
throws PatternSyntaxException
PatternSyntaxExceptionpublic int getLastChange(hudson.model.Run build)
public String getSlaveClientNameFormat()
public static String escapeP4String(String string)
public static String unescapeP4String(String string)
public static List<String> parseProjectPath(String projectPath,
String p4Client)
This parser can handle quoted or non-quoted mappings, normal two-part mappings, or one-part mappings with an implied right part. It can also deal with +// or -// mapping forms.
public static List<String> parseProjectPath(String projectPath,
String p4Client,
PrintStream log)
public String getClientSpec()
public void setClientSpec(String clientSpec)
path - the path to the ClientSpecpublic boolean isUseClientSpec()
public void setUseClientSpec(boolean useClientSpec)
useClientSpec - True if a ClientSpec file should be used to setup workspace view, False otherwisepublic boolean isUseStreamDepot()
public void setUseStreamDepot(boolean useStreamDepot)
useStreamDepot - True if stream depot is used, False otherwisepublic String getP4Stream()
public void setP4Stream(String stream)
stream - the stream namepublic String getProjectPath()
public void setProjectPath(String projectPath)
projectPath - the projectPath to setpublic String getP4User()
public void setP4User(String user)
user - the p4User to setpublic String getP4Passwd()
public String getDecryptedP4Passwd()
public String getDecryptedP4Passwd(hudson.model.AbstractBuild build)
public String getDecryptedP4Passwd(hudson.model.AbstractProject project)
public void setP4Passwd(String passwd)
passwd - the p4Passwd to setpublic String getP4Port()
public void setP4Port(String port)
port - the p4Port to setpublic String getP4Client()
public void setP4Client(String client)
client - the p4Client to setpublic String getP4SysDrive()
public void setP4SysDrive(String sysDrive)
sysDrive - the p4SysDrive to setpublic String getP4SysRoot()
public void setP4SysRoot(String sysRoot)
sysRoot - the p4SysRoot to setpublic String getP4Exe()
getP4Tool()
public void setP4Exe(String exe)
setP4Tool(String)
public String getP4Tool()
public void setP4Tool(String tool)
tool - the p4 tool installation to setpublic String getP4Label()
public void setP4Label(String label)
label - the p4Label to setpublic String getP4Counter()
public void setP4Counter(String counter)
counter - the p4Counter to setpublic String getP4UpstreamProject()
public void setP4UpstreamProject(String project)
label - the p4Label to setpublic boolean isUpdateCounterValue()
public void setUpdateCounterValue(boolean updateCounterValue)
updateCounterValue - True if the plugin should update the counter to the last changepublic boolean isExposeP4Passwd()
public void setExposeP4Passwd(boolean exposeP4Passwd)
exposeP4Passwd - True if the P4PASSWD value must be set in the environmentpublic String getProjectOptions()
public void setProjectOptions(String projectOptions)
projectOptions - the effective perforce options.public void setCreateWorkspace(boolean val)
createWorkspace - True to let the plugin create the workspace, false to let the user manage itpublic boolean isCreateWorkspace()
public void setUpdateView(boolean update)
update - True to let the plugin manage the view, false to let the user manage itpublic boolean isUpdateView()
public boolean isForceSync()
public boolean isAlwaysForceSync()
public boolean isDisableAutoSync()
public boolean isUseOldClientName()
public void setForceSync(boolean force)
force - True to perform a one time force sync, false to perform normal syncpublic void setAlwaysForceSync(boolean force)
force - True to perform a one time force sync, false to perform normal syncpublic void setDisableAutoSync(boolean disable)
disable - True to disable the pre-build sync, false to perform pre-build syncpublic void setUseOldClientName(boolean use)
use - True to use the old style client names, false to use the new stylepublic boolean isUseLabel()
public void setDontRenameClient(boolean dontRenameClient)
dontRenameClient - False if the client will rename the client spec for each
slavepublic boolean isDontRenameClient()
public boolean isWipeBeforeBuild()
public boolean isCleanWorkspaceBeforeBuild()
public boolean isWipeRepoBeforeBuild()
public void setSlaveClientNameFormat(String clientFormat)
clientFormat - A string defining the format of the client name for slave workspaces.public void setWipeBeforeBuild(boolean wipeBeforeBuild)
wipeBeforeBuild - True if the client is to delete the workspace files before building.public void setQuickCleanBeforeBuild(boolean quickCleanBeforeBuild)
public boolean isDontUpdateClient()
public void setDontUpdateClient(boolean dontUpdateClient)
public boolean isUseViewMaskForPolling()
public void setUseViewMaskForPolling(boolean useViewMaskForPolling)
public boolean isUseViewMaskForSyncing()
public void setUseViewMaskForSyncing(boolean useViewMaskForSyncing)
public String getViewMask()
public void setViewMask(String viewMask)
public boolean isUseViewMask()
public void setUseViewMask(boolean useViewMask)
public String getP4Charset()
public void setP4Charset(String p4Charset)
public String getP4CommandCharset()
public void setP4CommandCharset(String p4CommandCharset)
public String getLineEndValue()
public void setLineEndValue(String lineEndValue)
public boolean isShowIntegChanges()
public void setShowIntegChanges(boolean showIntegChanges)
public boolean isDisableSyncOnly()
public void setDisableSyncOnly(boolean disableSyncOnly)
public String getExcludedUsers()
public void setExcludedUsers(String users)
public String getExcludedFiles()
public void setExcludedFiles(String files)
public boolean isPollOnlyOnMaster()
public void setPollOnlyOnMaster(boolean pollOnlyOnMaster)
public boolean isDontUpdateServer()
public void setDontUpdateServer(boolean dontUpdateServer)
public boolean getExcludedFilesCaseSensitivity()
public void setExcludedFilesCaseSensitivity(boolean excludedFilesCaseSensitivity)
public void setWipeRepoBeforeBuild(boolean wipeRepoBeforeBuild)
public boolean isQuickCleanBeforeBuild()
public boolean isRestoreChangedDeletedFiles()
public void setRestoreChangedDeletedFiles(boolean restoreChangedDeletedFiles)
public List<String> getAllLineEndChoices()
public String getFirstChange()
public String getFileLimit()
public void setFileLimit(int fileLimit)
public boolean processWorkspaceBeforeDeletion(hudson.model.AbstractProject<?,?> project,
hudson.FilePath workspace,
hudson.model.Node node)
processWorkspaceBeforeDeletion in class hudson.scm.SCMproject - The project that owns this SCM. This is always the same
object for a particular instanceof SCM. Just passed in here
so that SCM itself doesn't have to remember the value.workspace - The workspace which is about to be deleted. Never null. This can be
a remote file path.node - The node that hosts the workspace. SCM can use this information to
determine the course of action.
SCM is OK to let Hudson proceed with deleting the
workspace.
False to veto the workspace deletion.public boolean requiresWorkspaceForPolling()
requiresWorkspaceForPolling in class hudson.scm.SCMpublic boolean isSlaveClientNameStatic()
public boolean supportsPolling()
supportsPolling in class hudson.scm.SCM
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||