|
||||||||||
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.IntegrateTask
public class IntegrateTask
Open files for branching or merging. 'p4 integrate' stages change propagation from source files to target files, opening the target files in the client workspace. 'p4 resolve' then merges content from the source files into the opened target files, and 'p4 submit' commits the opened files to the depot. Integrations can be abandoned with 'p4 revert'.
When 'p4 integrate' opens a target file in the client workspace, it chooses an appropriate action: 'branch' for new files, 'integrate' when the source file has changed, and 'delete' when the source file was deleted. Open target files are left read-only in the client workspace. 'p4 edit' can downgrade a 'branch' to an 'add' or an 'integrate' to an 'edit', making the file read-write. 'p4 integrate' maintains integration history between files. This eliminates duplicate integrations and minimizes file merges by telling 'p4 resolve' what to use as the merge base: generally the highest revision already integrated. Integration history also prevents integrating back a pure, integration-only change. Such a change is one that resulted from 'p4 resolve' without manually editing the file. The search for integration history will include integrations indirectly through intermediate file branches The commands 'p4 integrated' and 'p4 filelog' display integration history. A branch view may be given directly on the command line by stating the source (from) and target (to) files, or indirectly by naming a stored branch view with -b branch. A stored branch view may have many mappings, while a view on the command line can only have one. If a stored branch view is given, the target files and source files and revisions may be further limited on the command. If no file specification is given then the entire branch view is examined for needed integrations. If a file specification is given, the integration is limited to only those target files. In both cases, the integration is also limited to those target files that are also in the client view. If no revision specification is given then all revisions of the source file are considered for integration. If a single revision is given, then only revisions up to the given revision are included. If a pair of revisions is given (separated by a comma (,)) then only those revisions, inclusively, are integrated. Note that the revision specification concerns the fromFile, but is attached to the toFile. See 'p4 help revisions' for help specifying revisions.
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 boolean |
bidirectionalInteg
Causes the branch view to work bidirectionally, where the scope of the command is limited to integrations whose 'from' files match fromFile[revRange]. |
protected java.lang.String |
branch
If not null, use this as the integration branch specification. |
protected java.lang.String |
changelist
If positive, the integrated files are opened in the numbered pending changelist instead of the default changelist. |
protected boolean |
deleteTargetAfterDelete
If the source file has been deleted and the target file has changed, will delete the target file. |
protected boolean |
displayBaseDetails
Display the base file name and revision which will be used in subsequent resolves if a resolve is needed. |
protected boolean |
doBaselessMerge
Enables integration between files that have no integration history. |
protected boolean |
dontCopyToClient
Don't copy newly branched files to the client. |
protected boolean |
forceIntegration
Forces integrate to act without regard for previous integration history. |
protected java.lang.String |
fromFile
Source file and revision specifiers, separated by space. |
protected IFileSpec |
fromFileSpec
Source file and revision specifier for the Perforce command. |
protected boolean |
integrateAllAfterReAdd
If the source file has been deleted and re-added, will attempt to integrate all outstanding revisions of the file, including those revisions prior to the delete. |
protected boolean |
integrateAroundDeletedRevs
If true, enable integrations around deleted revisions; equivalent to -d (i.e. |
protected int |
maxFiles
If positive, integrate only the first maxFiles files. |
protected boolean |
propagateType
Propagate the source file's filetype to the target file. |
protected boolean |
rebranchSourceAfterDelete
If the target file has been deleted and the source file has changed, will re-branch the source file on top of the target file. |
protected boolean |
reverseMapping
Reverse the mappings in the branch view, with the target files and source files exchanging place. |
protected boolean |
showActionsOnly
Display what integrations would be necessary but don't actually do them. |
protected java.lang.String |
toFile
Target file and revision specifiers, separated by space. |
protected IFileSpec |
toFileSpec
Target file and revision specifier for the Perforce command. |
protected boolean |
useHaveRev
Causes the target files to be left at the revision currently on the client (the '#have' revision). |
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 | |
---|---|
IntegrateTask()
Default constructor. |
Method Summary | |
---|---|
protected void |
execP4Command()
Execute the Perforce integrate command with source and target file specs and options. |
IFileSpec |
getFromFileSpec()
Gets the from file spec. |
IFileSpec |
getToFileSpec()
Gets the to file spec. |
void |
setBidirectionalInteg(boolean bidirectionalInteg)
Sets the bidirectional integ. |
void |
setBranch(java.lang.String branch)
Sets the branch. |
void |
setChangelist(java.lang.String changelist)
Sets the changelist. |
void |
setDeleteTargetAfterDelete(boolean deleteTargetAfterDelete)
Sets the delete target after delete. |
void |
setDisplayBaseDetails(boolean displayBaseDetails)
Sets the display base details. |
void |
setDoBaselessMerge(boolean doBaselessMerge)
Sets the do baseless merge. |
void |
setDontCopyToClient(boolean dontCopyToClient)
Sets the dont copy to client. |
void |
setForceIntegration(boolean forceIntegration)
Sets the force integration. |
void |
setFromFile(java.lang.String fromFile)
Sets the from file. |
void |
setIntegrateAllAfterReAdd(boolean integrateAllAfterReAdd)
Sets the integrate all after re add. |
void |
setIntegrateAroundDeletedRevs(boolean integrateAroundDeletedRevs)
Sets the integrate around deleted revs. |
void |
setMaxFiles(int maxFiles)
Sets the max files. |
void |
setPropagateType(boolean propagateType)
Sets the propagate type. |
void |
setRebranchSourceAfterDelete(boolean rebranchSourceAfterDelete)
Sets the rebranch source after delete. |
void |
setReverseMapping(boolean reverseMapping)
Sets the reverse mapping. |
void |
setShowActionsOnly(boolean showActionsOnly)
Sets the show actions only. |
void |
setToFile(java.lang.String toFile)
Sets the to file. |
void |
setUseHaveRev(boolean useHaveRev)
Sets the use have rev. |
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 fromFile
protected java.lang.String toFile
protected java.lang.String changelist
protected boolean bidirectionalInteg
protected boolean integrateAroundDeletedRevs
protected boolean rebranchSourceAfterDelete
protected boolean deleteTargetAfterDelete
protected boolean integrateAllAfterReAdd
protected boolean forceIntegration
protected boolean useHaveRev
protected boolean doBaselessMerge
protected boolean displayBaseDetails
protected boolean showActionsOnly
protected boolean reverseMapping
protected boolean propagateType
protected boolean dontCopyToClient
protected java.lang.String branch
protected int maxFiles
protected IFileSpec fromFileSpec
protected IFileSpec toFileSpec
Constructor Detail |
---|
public IntegrateTask()
Method Detail |
---|
public void setFromFile(java.lang.String fromFile)
fromFile
- the new from filepublic void setToFile(java.lang.String toFile)
toFile
- the new to filepublic void setChangelist(java.lang.String changelist)
changelist
- the new changelistpublic void setBidirectionalInteg(boolean bidirectionalInteg)
bidirectionalInteg
- the new bidirectional integpublic void setIntegrateAroundDeletedRevs(boolean integrateAroundDeletedRevs)
integrateAroundDeletedRevs
- the new integrate around deleted revspublic void setRebranchSourceAfterDelete(boolean rebranchSourceAfterDelete)
rebranchSourceAfterDelete
- the new rebranch source after deletepublic void setDeleteTargetAfterDelete(boolean deleteTargetAfterDelete)
deleteTargetAfterDelete
- the new delete target after deletepublic void setIntegrateAllAfterReAdd(boolean integrateAllAfterReAdd)
integrateAllAfterReAdd
- the new integrate all after re addpublic void setForceIntegration(boolean forceIntegration)
forceIntegration
- the new force integrationpublic void setUseHaveRev(boolean useHaveRev)
useHaveRev
- the new use have revpublic void setDoBaselessMerge(boolean doBaselessMerge)
doBaselessMerge
- the new do baseless mergepublic void setDisplayBaseDetails(boolean displayBaseDetails)
displayBaseDetails
- the new display base detailspublic void setShowActionsOnly(boolean showActionsOnly)
showActionsOnly
- the new show actions onlypublic void setReverseMapping(boolean reverseMapping)
reverseMapping
- the new reverse mappingpublic void setPropagateType(boolean propagateType)
propagateType
- the new propagate typepublic void setDontCopyToClient(boolean dontCopyToClient)
dontCopyToClient
- the new dont copy to clientpublic void setBranch(java.lang.String branch)
branch
- the new branchpublic void setMaxFiles(int maxFiles)
maxFiles
- the new max filespublic IFileSpec getFromFileSpec()
public IFileSpec getToFileSpec()
protected void execP4Command() throws org.apache.tools.ant.BuildException
Integrate ("merge") from one Perforce filespec to another. The semantics of Perforce merges are complex and are not explained here; please consult the main Perforce documentation for file merges and the IntegrateFilesOptions Javdoc comments for details of the less-commonly-used options.
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 |