|
||||||||||
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.LabelTask
public class LabelTask
Create a new label specification or edit an existing label specification. A name is required.
A label is a shorthand for referring to a collection of revisions. See 'p4 help revisions' for information on using labels. A label is either automatic or static. An automatic label refers to the revisions given in the View: and Revision: fields. A static label refers to the revisions associated with the label by the 'p4 tag' or 'p4 labelsync' commands. A static label cannot have a Revision: field.
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 boolean |
delete
Delete the label. |
protected java.lang.String |
description
Description of the label. |
protected boolean |
force
Force the update or deletion of a label. |
protected boolean |
locked
Lock the label. |
protected java.lang.String |
name
Name of the label. |
protected java.lang.String |
owner
Owner of the label. |
protected ILabel |
retLabel
New or updated label returned from the Perforce command. |
protected java.lang.String |
revision
Revision specification for the label. |
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 | |
---|---|
LabelTask()
Default constructor. |
Method Summary | |
---|---|
protected void |
execP4Command()
Execute the Perforce label command with the following logical sequence: |
ILabel |
getRetLabel()
Gets the ret label. |
void |
setDelete(boolean delete)
Sets the delete. |
void |
setDescription(java.lang.String description)
Sets the description. |
void |
setForce(boolean force)
Sets the force. |
void |
setLocked(boolean locked)
Sets the locked. |
void |
setName(java.lang.String name)
Sets the name. |
void |
setOwner(java.lang.String owner)
Sets the owner. |
void |
setRevision(java.lang.String revision)
Sets the revision. |
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 name
protected java.lang.String owner
protected java.lang.String description
protected java.lang.String revision
protected boolean locked
protected boolean delete
protected boolean force
protected ILabel retLabel
Constructor Detail |
---|
public LabelTask()
Method Detail |
---|
public void setName(java.lang.String name)
name
- the new namepublic void setOwner(java.lang.String owner)
owner
- the new ownerpublic void setDescription(java.lang.String description)
setDescription
in class org.apache.tools.ant.ProjectComponent
description
- the new descriptionpublic void setLocked(boolean locked)
locked
- the new lockedpublic void setRevision(java.lang.String revision)
revision
- the new revisionpublic void setDelete(boolean delete)
delete
- the new deletepublic void setForce(boolean force)
force
- the new forcepublic ILabel getRetLabel()
protected void execP4Command() throws org.apache.tools.ant.BuildException
1. Delete the label, if "delete" is true.
2. Otherwise, create a new label, if the required label fields are set.
3. Otherwise, update the label with new info, if it exists.
Also, log the info of the newly created or updated label.
Delete a named Perforce label from the Perforce server.
Update an existing Perforce label in the Perforce server.
Create a new Perforce label in the Perforce server.
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 |