|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
com.perforce.p4java.ant.tasks.PerforceTask
com.perforce.p4java.ant.tasks.ServerTask
com.perforce.p4java.ant.tasks.ClientTask
com.perforce.p4java.ant.tasks.SubmitTask
public class SubmitTask
Commits a pending changelist and its files to the depot.
With no argument 'p4 submit' attempts to submit all files in the 'default' changelist. Submit provides the user with a dialog similar to 'p4 change' so the user can compose a changelist description. In this dialog the user is presented with the list of files open in changelist 'default'. Files may be deleted from this list but they cannot be added. (Use an open command (edit, add, delete) to add additional files to a changelist.). If a (single) file pattern is given, only those files in the 'default' changelist that match the pattern will be submitted.
PerforceTask
,
ServerTask
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.perforce.p4java.ant.tasks.ServerTask |
---|
ServerTask.GlobalOption |
Nested classes/interfaces inherited from class com.perforce.p4java.ant.tasks.PerforceTask |
---|
PerforceTask.Field, PerforceTask.File |
Field Summary | |
---|---|
protected java.lang.String |
changelist
Submits the numbered pending changelist that has been previously created or a failed submit. |
protected java.lang.String |
changelistDescription
The description of the changelist. |
protected java.lang.String |
changelistProperty
Name of property to set the new changelist number, if the Perforce server renumbers the change. |
protected java.lang.String |
jobs
List of job IDs, separated by whitespace, for jobs that will have their status changed to fixed or "jobStatus". |
protected java.lang.String |
jobStatus
Status of jobs will be set on a successful submit; if null the jobs will be marked fixed. |
protected java.lang.String |
needsResolveProperty
Name of property to be set to true, if the submit requires a resolve. |
protected boolean |
reOpen
If true, it allows submitted files to remain open (on the client's default changelist) after the submit has completed. |
Fields inherited from class com.perforce.p4java.ant.tasks.ClientTask |
---|
p4Client |
Fields inherited from class com.perforce.p4java.ant.tasks.ServerTask |
---|
allHosts, commandOptions, globaloptions, hostName, P4_SERVER_PROTOCOL_PROPERTIES_FILE, P4_SERVER_USAGE_PROPERTIES_FILE, p4Server, programName, programVersion, protocolPropertiesFile, protocolProps, textLanguage, unsetClientName, unsetUserName, usagePropertiesFile, usageProps, workingDirectory |
Fields inherited from class com.perforce.p4java.ant.tasks.PerforceTask |
---|
charset, client, failOnError, fields, FILE_TOKEN_REGEX_PATTERN, fileList, files, fileSpecs, LINE_PADDING, LINE_SEPARATOR, p4Messages, passwd, port, protocol, retFileSpecs, retStatusMessage, user |
Fields inherited from class org.apache.tools.ant.Task |
---|
target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
description, location, project |
Constructor Summary | |
---|---|
SubmitTask()
Default constructor. |
Method Summary | |
---|---|
protected void |
execP4Command()
Execute the Perforce submit command with changelist and options. |
protected java.util.LinkedList<java.lang.String> |
getJobs(java.lang.String jobs)
Gets the tokenized (by whitespace) job attribute. |
protected void |
handleMessage(java.util.List<IFileSpec> fileSpecList)
Handle the "must resolve" message for file specs returned from the Perforce submit command. |
void |
setChangelist(java.lang.String changelist)
Sets the changelist. |
void |
setChangelistDescription(java.lang.String changelistDescription)
Sets the changelist description. |
void |
setChangelistProperty(java.lang.String changelistProperty)
Sets the changelist property. |
void |
setJobs(java.lang.String jobs)
Sets the jobs. |
void |
setJobStatus(java.lang.String jobStatus)
Sets the job status. |
void |
setNeedsResolveProperty(java.lang.String needsResolveProperty)
Sets the needs resolve property. |
void |
setReOpen(boolean reOpen)
Sets the re open. |
Methods inherited from class com.perforce.p4java.ant.tasks.ClientTask |
---|
cleanupP4, getP4Client, initP4, setP4Client |
Methods inherited from class com.perforce.p4java.ant.tasks.ServerTask |
---|
cleanupP4Server, createGlobalOption, getGlobalOptions, getP4Server, initP4Server, initP4ServerOptions, setAllHosts, setHostName, setP4Server, setProgramName, setProgramVersion, setProtocolPropertiesFile, setProtocolProps, setTextLanguage, setUnsetClientName, setUnsetUserName, setUsagePropertiesFile, setUsageProps, setWorkingDirectory |
Methods inherited from class com.perforce.p4java.ant.tasks.PerforceTask |
---|
addFileset, createField, createFile, execute, getFields, getFiles, getFileSpecs, getRetFileSpecs, getRetStatusMessage, init, isEmpty, logChangelistSummaries, logChangelistSummary, logExtendedFileSpec, logExtendedFileSpecs, logFileDiff, logFileDiffs, logFileLineMatch, logFileLineMatches, logFileSpec, logFileSpecs, logFix, logFixes, logJob, logJobs, parseChangelist, setCharset, setClient, setFailOnError, setFiles, setPasswd, setPort, setProtocol, setUser |
Methods inherited from class org.apache.tools.ant.Task |
---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String changelist
protected java.lang.String changelistDescription
protected java.lang.String changelistProperty
protected java.lang.String needsResolveProperty
protected boolean reOpen
protected java.lang.String jobs
protected java.lang.String jobStatus
Constructor Detail |
---|
public SubmitTask()
Method Detail |
---|
public void setChangelist(java.lang.String changelist)
changelist
- the new changelistpublic void setChangelistDescription(java.lang.String changelistDescription)
changelistDescription
- the new changelist descriptionpublic void setChangelistProperty(java.lang.String changelistProperty)
changelistProperty
- the new changelist propertypublic void setNeedsResolveProperty(java.lang.String needsResolveProperty)
needsResolveProperty
- the new needs resolve propertypublic void setReOpen(boolean reOpen)
reOpen
- the new re openpublic void setJobs(java.lang.String jobs)
jobs
- the new jobspublic void setJobStatus(java.lang.String jobStatus)
jobStatus
- the new job statusprotected void execP4Command() throws org.apache.tools.ant.BuildException
Submit this changelist and associate it with any jobs in the passed-in options. Will fail with a suitable request exception if this is not a pending changelist associated with the current client.
If the submit is successful, the status of the underlying changelist will be updated to reflect the new status. Other fields will not be automatically updated and need to be refreshed with the refresh() method if you need to access them live.
Note that the list of filespecs returned from the submit will contain only summary filespecs for successful files -- generally only the depot path, action, and revisions fields will be valid; other fields may be null or undefined depending on the server and client implementations. That is, do not rely on the returned filespec list for anything other than depot paths.
execP4Command
in class PerforceTask
org.apache.tools.ant.BuildException
- the build exceptionPerforceTask.execP4Command()
protected java.util.LinkedList<java.lang.String> getJobs(java.lang.String jobs)
jobs
- the jobs
protected void handleMessage(java.util.List<IFileSpec> fileSpecList)
fileSpecList
- the file spec list
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |