org.apache.tools.ant.taskdefs.optional.perforce

Class P4Labelsync


public class P4Labelsync
extends P4Base

This method syncs an existing Perforce label against the Perforce client or against a set of files/revisions. Example Usage:
   <p4labelsync name="MyLabel-${TSTAMP}-${DSTAMP}"
   view="//depot/...#head;//depot2/file1#25" />
 

Field Summary

protected String
name

Fields inherited from class org.apache.tools.ant.taskdefs.optional.perforce.P4Base

P4Client, P4CmdOpts, P4Opts, P4Port, P4User, P4View, failOnError, shell, util

Fields inherited from class org.apache.tools.ant.Task

description, location, target, taskName, taskType, wrapper

Fields inherited from class org.apache.tools.ant.ProjectComponent

project

Method Summary

void
execute()
do the work
boolean
isAdd()
-a flag of p4 labelsync - preserve files which exist in the label, but not in the current view
boolean
isDelete()
-d flag of p4 labelsync; indicates an intention of deleting from the label the files specified in the view
boolean
isSimulationmode()
-n flag of p4 labelsync - display changes without actually doing them
void
setAdd(boolean add)
-a flag of p4 labelsync - preserve files which exist in the label, but not in the current view
void
setDelete(boolean delete)
-d flag of p4 labelsync; indicates an intention of deleting from the label the files specified in the view
void
setName(String name)
The name of the label; optional, default "AntLabel"
void
setSimulationmode(boolean simulationmode)
-n flag of p4 labelsync - display changes without actually doing them

Methods inherited from class org.apache.tools.ant.taskdefs.optional.perforce.P4Base

execP4Command, execP4Command, getErrorMessage, getInError, init, setClient, setCmdopts, setErrorMessage, setFailonerror, setGlobalopts, setInError, setPort, setUser, setView

Methods inherited from class org.apache.tools.ant.Task

execute, getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType

Methods inherited from class org.apache.tools.ant.ProjectComponent

getProject, log, log, setProject

Field Details

name

protected String name

Method Details

execute

public void execute()
            throws BuildException
do the work
Overrides:
execute in interface Task
Throws:
BuildException - if the label name is not supplied

isAdd

public boolean isAdd()
-a flag of p4 labelsync - preserve files which exist in the label, but not in the current view
Returns:
add attribute if set to true the task will not remove any files from the label only add files which were not there previously or update these where the revision has changed the add attribute is the -a flag of p4 labelsync

isDelete

public boolean isDelete()
-d flag of p4 labelsync; indicates an intention of deleting from the label the files specified in the view
Returns:
delete attribute

isSimulationmode

public boolean isSimulationmode()
-n flag of p4 labelsync - display changes without actually doing them
Returns:
-n flag of p4 labelsync

setAdd

public void setAdd(boolean add)
-a flag of p4 labelsync - preserve files which exist in the label, but not in the current view
Parameters:
add - if set to true the task will not remove any files from the label only add files which were not there previously or update these where the revision has changed the add attribute is the -a flag of p4 labelsync

setDelete

public void setDelete(boolean delete)
-d flag of p4 labelsync; indicates an intention of deleting from the label the files specified in the view
Parameters:
delete - indicates intention of deleting from the label the files specified in the view

setName

public void setName(String name)
The name of the label; optional, default "AntLabel"
Parameters:
name - of the label

setSimulationmode

public void setSimulationmode(boolean simulationmode)
-n flag of p4 labelsync - display changes without actually doing them
Parameters:
simulationmode - display changes without actually doing them

Copyright B) 2000-2007 Apache Software Foundation. All Rights Reserved.