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

java.lang.Object
  |
  +--org.apache.tools.ant.Task
        |
        +--org.apache.tools.ant.taskdefs.Exec
              |
              +--org.apache.tools.ant.taskdefs.optional.perforce.P4sync

public class P4sync
extends Exec

Perforce

Description

Handles packages/modules retrieved from a Perforce repository.

Parameters

Attribute Description Required
localpath The local path of the file/directory to write file(s) to. Yes
user Specifies the user name, overriding the value of $P4USER, $USER, and $USERNAME in the environment.

No

port Specifies the server's listen address, overriding the value of $P4PORT in the environment and the default (perforce:1666).

No

version The revision number of the file being extracted. No
date Get files as of this date. Either [yyyy/mm/dd] or [yyyy/mm/dd:hh:mm:ss]. Note that [yyyy/mm/dd] means [yyyy/mm/dd:00:00:00], so if you want to include all events on that day refer to the next day. No
label A label from which to check out files. No
force "[true|false]". Forces resynchronization even if the client already has the file, and clobbers writable files. This flag doesn't affect open files. No, default "false"
change Gets the file(s) as they were when a specified change number was applied.

No

Examples

  <perforce localpath="//path/to/source/..."
        force="true"
        change="4513"
   />

syncs the files in the source directory that are in the Perforce repository, as of change number 4513, overwriting any modified files in the current source tree is needed. You cannot specify more than one of (date, label, revision).

  <perforce localpath="//path/to/source/..." />

Syncs with the latest version of the file in the repository.


Fields inherited from class org.apache.tools.ant.taskdefs.Exec
fos
 
Fields inherited from class org.apache.tools.ant.Task
description, location, project, target, taskName, taskType, wrapper
 
Constructor Summary
P4sync()
           
 
Method Summary
 void execute()
          Called by the project to let the task do it's work.
protected  void outputLog(java.lang.String line, int messageLevel)
           
 void setChange(java.lang.String changenum)
           
 void setDate(java.lang.String date)
           
 void setForce(boolean force)
           
 void setLabel(java.lang.String label)
           
 void setLocalpath(java.lang.String directory)
           
 void setP4port(java.lang.String p4port)
           
 void setP4user(java.lang.String p4user)
           
 void setPort(java.lang.String p4port)
           
 void setRevision(java.lang.String revision)
           
 void setUser(java.lang.String p4user)
           
 void setVersion(java.lang.String revision)
           
 
Methods inherited from class org.apache.tools.ant.taskdefs.Exec
logFlush, run, setCommand, setDir, setFailonerror, setOs, setOutput
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getProject, getRuntimeConfigurableWrapper, getTaskName, init, log, log, maybeConfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

P4sync

public P4sync()
Method Detail

execute

public void execute()
             throws BuildException
Description copied from class: Task
Called by the project to let the task do it's work. Normally it does nothing.
Overrides:
execute in class Exec
Following copied from class: org.apache.tools.ant.Task
Throws:
BuildException - if someting goes wrong with the build

outputLog

protected void outputLog(java.lang.String line,
                         int messageLevel)
Overrides:
outputLog in class Exec

setForce

public void setForce(boolean force)

setLabel

public void setLabel(java.lang.String label)

setDate

public void setDate(java.lang.String date)

setLocalpath

public void setLocalpath(java.lang.String directory)

setVersion

public void setVersion(java.lang.String revision)

setRevision

public void setRevision(java.lang.String revision)

setChange

public void setChange(java.lang.String changenum)

setP4user

public void setP4user(java.lang.String p4user)

setUser

public void setUser(java.lang.String p4user)

setPort

public void setPort(java.lang.String p4port)

setP4port

public void setP4port(java.lang.String p4port)


Copyright © 2000 Apache Software Foundation. All Rights Reserved.