|
||||||||||
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.ChangeTask
public class ChangeTask
Create or edit a changelist description. With no argument, 'p4 change' creates a new changelist. If a changelist number is given, 'p4 change' edits an existing, pending changelist. In both cases the changelist specification is placed into a form and the user's editor is invoked. The "deletependingchangelist" (-d flag) option discards a pending changelist, but only if it has no opened files and no pending fixes associated with it.
PerforceTask
,
ClientTask
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
The changelist to be deleted. |
protected boolean |
deletePendingChangelist
If true, the pending changelist will be deleted. |
protected java.lang.String |
description
The description of the changelist. |
protected java.lang.String |
property
The property to be set with the changelist number. |
protected IChangelist |
retChangelist
New or updated changelist returned by the Perforce command. |
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 |
---|
location, project |
Constructor Summary | |
---|---|
ChangeTask()
Default constructor. |
Method Summary | |
---|---|
protected void |
execP4Command()
Execute the Perforce change command with the following logical sequence: |
IChangelist |
getRetChangelist()
Gets the ret changelist. |
void |
setChangelist(java.lang.String changelist)
Sets the changelist. |
void |
setDeletePendingChangelist(boolean deletePendingChangelist)
Sets the delete pending changelist. |
void |
setDescription(java.lang.String description)
Sets the description. |
void |
setProperty(java.lang.String property)
Sets the property. |
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, 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 description
protected boolean deletePendingChangelist
protected java.lang.String changelist
protected java.lang.String property
protected IChangelist retChangelist
Constructor Detail |
---|
public ChangeTask()
Method Detail |
---|
public void setDescription(java.lang.String description)
setDescription
in class org.apache.tools.ant.ProjectComponent
description
- the new descriptionpublic void setDeletePendingChangelist(boolean deletePendingChangelist)
deletePendingChangelist
- the new delete pending changelistpublic void setChangelist(java.lang.String changelist)
changelist
- the new changelistpublic void setProperty(java.lang.String property)
property
- the new propertypublic IChangelist getRetChangelist()
protected void execP4Command() throws org.apache.tools.ant.BuildException
1. Delete the changelist, if "deletePendingChangelist" is true.
2. Otherwise, create a new changelist.
3. Assign the new changelist number to a specified property.
Create a new changelist for this Perforce client in the associated Perforce server. The newly-created changelist has no files associated with it (regardless of whether the passed-in changelist spec has files associated with it); if you wish to add files to the new changelist, you need to do a reopen on them explictly after the new changelist is returned.
execP4Command
in class PerforceTask
org.apache.tools.ant.BuildException
- the build exceptionPerforceTask.execP4Command()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |