From e13d922745cda9a00544c2010e21cafce218e709 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Fri, 6 Oct 2000 10:54:09 +0000 Subject: [PATCH] Documentation for the perforce task. Submitted by: Joe Walker git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268067 13f79535-47bb-0310-9956-ffa450edef68 --- docs/P4desc.html | 90 +++++++++++++++++ docs/index.html | 1 + .../tools/ant/taskdefs/defaults.properties | 2 +- .../taskdefs/optional/perforce/P4sync.java | 99 +++++++++++++++---- 4 files changed, 173 insertions(+), 19 deletions(-) create mode 100644 docs/P4desc.html diff --git a/docs/P4desc.html b/docs/P4desc.html new file mode 100644 index 000000000..298c510ae --- /dev/null +++ b/docs/P4desc.html @@ -0,0 +1,90 @@ + + + + +

Perforce

+ +

Description

+ +

Handles packages/modules retrieved from a Perforce repository.

+ +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionRequired
localpathThe local path of the file/directory to + write file(s) to.Yes
userSpecifies the user name, overriding the value of $P4USER, + $USER, and $USERNAME in the environment.

No

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

No

+
versionThe revision number of the file being + extracted.No
dateGet 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
labelA 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"
changeGets 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.

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

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

+ + diff --git a/docs/index.html b/docs/index.html index 1025f6137..657bd62b7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4382,6 +4382,7 @@ it had been located at htdocs/manual/ChangeLog.txt.

  • JUnit
  • Native2Ascii
  • NetRexxC
  • +
  • Perforce
  • RenameExtensions
  • Script
  • VssGet
  • diff --git a/src/main/org/apache/tools/ant/taskdefs/defaults.properties b/src/main/org/apache/tools/ant/taskdefs/defaults.properties index 3d63a56c6..7c703beb5 100644 --- a/src/main/org/apache/tools/ant/taskdefs/defaults.properties +++ b/src/main/org/apache/tools/ant/taskdefs/defaults.properties @@ -63,7 +63,7 @@ starteam=org.apache.tools.ant.taskdefs.optional.scm.AntStarTeamCheckOut wljspc=org.apache.tools.ant.taskdefs.optional.jsp.WLJspc jlink=org.apache.tools.ant.taskdefs.optional.jlink.JlinkTask native2ascii=org.apache.tools.ant.taskdefs.optional.Native2Ascii -p4sync=org.apache.tools.ant.taskdefs.optional.perforce.P4sync +perforce=org.apache.tools.ant.taskdefs.optional.perforce.P4sync # deprecated ant tasks (kept for back compatibility) javadoc2=org.apache.tools.ant.taskdefs.Javadoc diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4sync.java b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4sync.java index 78209a6f3..14e170b17 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4sync.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4sync.java @@ -59,24 +59,87 @@ import org.apache.tools.ant.taskdefs.Exec; import org.apache.tools.ant.Task; /** - * A Perforce checkout utility. - * Implements the ability to write: - *
    - *  >p4sync dir="src"
    - *      force="no"
    - *      date="2000/04/01"
    - *      time="14:15:29"
    - *      label="labelname"
    - *      revision="#have"
    - *      viewonly="true"
    - *   />
    - * 
    - * Where: - * 1. "dir" is mandatory, the rest are optional; - * 2. If you specify time, you have to specify date. - * 2a. If you specify date but not time, midnight is implied. - * 3. You cannot specify more than one of (date, label, revision). - * 4. Any "sync" error is considered a fatal error, and a BuildException is returned. + *

    Perforce

    + *

    Description

    + *

    Handles packages/modules retrieved from a Perforce repository.

    + *

    Parameters

    + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    AttributeDescriptionRequired
    localpathThe local path of the file/directory to + * write file(s) to.Yes
    userSpecifies the user name, overriding the value of $P4USER, + * $USER, and $USERNAME in the environment.

    No

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

    No

    + *
    versionThe revision number of the file being + * extracted.No
    dateGet 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
    labelA 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"
    changeGets 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.

    */ public class P4sync extends Exec { private String p4user;