|
||||||||||
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.SyncTask
public class SyncTask
Synchronize the client with its view of the depot.
Sync updates the client workspace to reflect its current view (if it has changed) and the current contents of the depot (if it has changed). The client view is used to map client file names to depot file names and vice versa. Sync adds files that are in the client view but which have not been retrieved before. Sync deletes previously retrieved files which are no longer in the client view or have been deleted from the depot. Sync updates files which are still in the client view and which have been updated in the depot. Normally, sync affects all files in the client workspace. If file arguments are given, sync limits its operation to those files. The file arguments may contain wildcards. If the file argument includes a revision specifier, then the given revision is retrieved. Normally, the head revision is retrieved. See 'p4 help revisions' for help specifying revisions. If the file argument includes a revision range specification, then only files selected by the revision range are updated, and the highest revision in the range is used. Normally, sync will not clobber files in the client workspace that the user has made writable. Setting the 'clobber' option in the client spec disables this safety check.
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 |
clientBypass
If true, it bypasses the client file update. |
protected boolean |
forceUpdate
If true, it forces re-sync even if the client already has the file, and clobbers writable files. |
protected boolean |
noUpdate
If true, it causes sync not to update the client workspace, but to list what normally would be updated. |
protected boolean |
serverBypass
If true, it populates the client workspace, but does not update the server to reflect those updates. |
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 | |
---|---|
SyncTask()
Default constructor. |
Method Summary | |
---|---|
protected void |
execP4Command()
Execute the Perforce sync command with file specs, changelist and options. |
void |
setClientBypass(boolean clientBypass)
Sets the client bypass. |
void |
setForceUpdate(boolean forceUpdate)
Sets the force update. |
void |
setNoUpdate(boolean noUpdate)
Sets the no update. |
void |
setServerBypass(boolean serverBypass)
Sets the server bypass. |
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 boolean forceUpdate
protected boolean noUpdate
protected boolean clientBypass
protected boolean serverBypass
Constructor Detail |
---|
public SyncTask()
Method Detail |
---|
public void setForceUpdate(boolean forceUpdate)
forceUpdate
- the new force updatepublic void setNoUpdate(boolean noUpdate)
noUpdate
- the new no updatepublic void setClientBypass(boolean clientBypass)
clientBypass
- the new client bypasspublic void setServerBypass(boolean serverBypass)
serverBypass
- the new server bypassprotected void execP4Command() throws org.apache.tools.ant.BuildException
Sync a Perforce client workspace against 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 |