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

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.tools.ant.taskdefs.optional.perforce.P4Base
              extended by org.apache.tools.ant.taskdefs.optional.perforce.P4Integrate
All Implemented Interfaces:
java.lang.Cloneable

public class P4Integrate
extends P4Base

Integrate file(s). P4Change should be used to obtain a new changelist for P4Integrate, although P4Integrate can open files to the default change, P4Submit cannot yet submit to it. Example Usage:
<p4integrate change="${p4.change}" fromfile="//depot/project/dev/foo.txt" tofile="//depot/project/main/foo.txt" />


Field Summary
 
Fields inherited from class org.apache.tools.ant.taskdefs.optional.perforce.P4Base
failOnError, P4Client, P4CmdOpts, P4Opts, P4Port, P4User, P4View, shell, util
 
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
P4Integrate()
           
 
Method Summary
 void execute()
          execute the p4 integrate
 java.lang.String getBranch()
          get the branch
 java.lang.String getChange()
          get the changelist number
 java.lang.String getFromfile()
          get the from file specification
 java.lang.String getTofile()
          get the to file specification
 boolean isEnableBaselessMerges()
          gets the enablebaselessmerges flag
 boolean isForceIntegrate()
          gets the forceintegrate flag
 boolean isLeaveTargetRevision()
          gets the leavetargetrevision flag
 boolean isNocopynewtargetfiles()
          indicates intention to suppress the copying on the local hard disk of new target files.
 boolean isPropagatesourcefiletype()
          returns flag indicating if propagation of source file type is sought
 boolean isRestoreDeletedRevisions()
          gets the restoredeletedrevisions flag
 boolean isReversebranchmappings()
          returns the flag indicating if reverse branch mappings are sought
 boolean isSimulationMode()
          gets the simulationmode flag
 void setBranch(java.lang.String br)
          sets the branch
 void setChange(java.lang.String change)
          set the changelist number for the operation
 void setEnableBaselessMerges(boolean setrest)
          sets the enablebaselessmerges flag
 void setForceIntegrate(boolean setrest)
          sets the forceintegrate flag
 void setFromfile(java.lang.String fromf)
          sets the from file specification
 void setLeaveTargetRevision(boolean setrest)
          sets the leavetargetrevision flag
 void setNocopynewtargetfiles(boolean nocopynewtargetfiles)
          sets nocopynewtargetfiles flag
 void setPropagatesourcefiletype(boolean propagatesourcefiletype)
          sets flag indicating if one wants to propagate the source file type
 void setRestoreDeletedRevisions(boolean setrest)
          sets the restoredeletedrevisions flag
 void setReversebranchmappings(boolean reversebranchmappings)
          sets the reversebranchmappings flag
 void setSimulationMode(boolean setrest)
          sets the simulationmode flag
 void setTofile(java.lang.String tof)
          sets the to file specification
 
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
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
 

Constructor Detail

P4Integrate

public P4Integrate()
Method Detail

getChange

public java.lang.String getChange()
get the changelist number

Returns:
the changelist number set for this task

setChange

public void setChange(java.lang.String change)
set the changelist number for the operation

Parameters:
change - An existing changelist number to assign files to; optional but strongly recommended.

getFromfile

public java.lang.String getFromfile()
get the from file specification

Returns:
the from file specification

setFromfile

public void setFromfile(java.lang.String fromf)
sets the from file specification

Parameters:
fromf - the from file specification

getTofile

public java.lang.String getTofile()
get the to file specification

Returns:
the to file specification

setTofile

public void setTofile(java.lang.String tof)
sets the to file specification

Parameters:
tof - the to file specification

getBranch

public java.lang.String getBranch()
get the branch

Returns:
the name of the branch

setBranch

public void setBranch(java.lang.String br)
sets the branch

Parameters:
br - the name of the branch to use

isRestoreDeletedRevisions

public boolean isRestoreDeletedRevisions()
gets the restoredeletedrevisions flag

Returns:
restore deleted revisions

setRestoreDeletedRevisions

public void setRestoreDeletedRevisions(boolean setrest)
sets the restoredeletedrevisions flag

Parameters:
setrest - value chosen for restoredeletedrevisions

isForceIntegrate

public boolean isForceIntegrate()
gets the forceintegrate flag

Returns:
restore deleted revisions

setForceIntegrate

public void setForceIntegrate(boolean setrest)
sets the forceintegrate flag

Parameters:
setrest - value chosen for forceintegrate

isLeaveTargetRevision

public boolean isLeaveTargetRevision()
gets the leavetargetrevision flag

Returns:
flag indicating if the target revision should be preserved

setLeaveTargetRevision

public void setLeaveTargetRevision(boolean setrest)
sets the leavetargetrevision flag

Parameters:
setrest - value chosen for leavetargetrevision

isEnableBaselessMerges

public boolean isEnableBaselessMerges()
gets the enablebaselessmerges flag

Returns:
boolean indicating if baseless merges are desired

setEnableBaselessMerges

public void setEnableBaselessMerges(boolean setrest)
sets the enablebaselessmerges flag

Parameters:
setrest - value chosen for enablebaselessmerges

isSimulationMode

public boolean isSimulationMode()
gets the simulationmode flag

Returns:
simulation mode flag

setSimulationMode

public void setSimulationMode(boolean setrest)
sets the simulationmode flag

Parameters:
setrest - value chosen for simulationmode

isReversebranchmappings

public boolean isReversebranchmappings()
returns the flag indicating if reverse branch mappings are sought

Returns:
reversebranchmappings flag

setReversebranchmappings

public void setReversebranchmappings(boolean reversebranchmappings)
sets the reversebranchmappings flag

Parameters:
reversebranchmappings - flag indicating if reverse branch mappings are sought

isPropagatesourcefiletype

public boolean isPropagatesourcefiletype()
returns flag indicating if propagation of source file type is sought

Returns:
flag set to true if you want to propagate source file type for existing target files

setPropagatesourcefiletype

public void setPropagatesourcefiletype(boolean propagatesourcefiletype)
sets flag indicating if one wants to propagate the source file type

Parameters:
propagatesourcefiletype - set it to true if you want to change the type of existing target files according to type of source file.

isNocopynewtargetfiles

public boolean isNocopynewtargetfiles()
indicates intention to suppress the copying on the local hard disk of new target files.

Returns:
indicates intention to suppress the copying on the local hard disk of new target files.

setNocopynewtargetfiles

public void setNocopynewtargetfiles(boolean nocopynewtargetfiles)
sets nocopynewtargetfiles flag

Parameters:
nocopynewtargetfiles - set it to true to gain speed in integration by not copying on the local Perforce client new target files

execute

public void execute()
             throws BuildException
execute the p4 integrate

Overrides:
execute in class Task
Throws:
BuildException - if there are missing parameters