Thanks for the quick addition and sorry for not following
guidelines the previous time. Here's the patched doc.
--Anli
-----Original Message-----
From: Peter Donald [mailto:[EMAIL PROTECTED]
Sent: Monday, September 10, 2001 9:35 PM
To: [EMAIL PROTECTED]
Subject: Re: p4add; source code attached
Hi,
I added the task but no documentation. Could you create doc file and send
it?
Also you should probably follow guidelines at
http://jakarta.apache.org/site/source.html for supplying patches or else it
makes it harder for us to identify patches sometimes ;)
On Thu, 6 Sep 2001 02:52, Anli Shundi wrote:
> I wrote for my own use perforce's p4add optional task --
> seems this was already requested.
>
> Is it possible to add it to the distribution ?
>
> Options:
> commandlength is a positive integer specifying the maximum length
> of the commandline when adding files. Defaults to 450,
> higher values mean faster execution, but also possible
> failures.
> OPTIONAL
>
> changelist is a positive integer specifying the changelist. If not
> specified
> the files will be added to the default one. OPTIONAL.
>
> Usage sample:
>
> Require a changelist, add all java files starting from a directory,
> and submit
>
> <p4change/>
> <p4add commandlength="20000" changelist="${p4.change}">
> <fileset dir="../dir/src/" includes="**/*.java"/>
> </p4add>
> <p4submit change="${p4.change}"/>
>
> Files to add:
> src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java
>
> Files to change:
> 1. In src/main/org/apache/tools/ant/taskdefs/defaults.properties add
>
> p4add=org.apache.tools.ant.taskdefs.optional.perforce.P4Add
>
> 2. Update docs/manual/OptionalTasks/perforce.html
>
>
> Anli Shundi [EMAIL PROTECTED]
> Product Development Group office: (919) 969-6518
> TIBCO Software Inc.
>
> www.extensibility.com | www.XMLschema.com | www.tibco.com
--
Cheers,
Pete
*-----------------------------------------------------*
| For those who refuse to understand, no explanation |
| will ever suffice. For those who refuse to believe, |
| no evidence will ever suffice. |
*-----------------------------------------------------*
Index: perforce.html
===================================================================
RCS file: /home/cvspublic/jakarta-ant/docs/manual/OptionalTasks/perforce.html,v
retrieving revision 1.8
diff -u -r1.8 perforce.html
--- perforce.html 2001/07/27 06:46:49 1.8
+++ perforce.html 2001/09/11 19:34:39
@@ -73,7 +73,11 @@
<td><a href="#p4revert">P4Revert</a></td>
<td>Revert files</td>
</tr>
-
+
+ <tr>
+ <td><a href="#p4add">P4Add</a></td>
+ <td>Add files</td>
+ </tr>
</table>
<h3>General P4 Properties</h3>
@@ -149,7 +153,7 @@
</p>
<h3>Taskdefs</h3>
-<p>Standard taskdefs (for you to copy'n'paste)</p>
+<p>Standard taskdefs (for you to copy'n'paste) -- normally this is done
automatically if you install this optional task.</p>
<pre>
<taskdef name="p4sync"
classname="org.apache.tools.ant.taskdefs.optional.perforce.P4Sync"
/>
<taskdef name="p4change"
classname="org.apache.tools.ant.taskdefs.optional.perforce.P4Change"
/>
@@ -158,8 +162,9 @@
<taskdef name="p4have"
classname="org.apache.tools.ant.taskdefs.optional.perforce.P4Have"
/>
<taskdef name="p4label"
classname="org.apache.tools.ant.taskdefs.optional.perforce.P4Label"
/>
<taskdef name="p4counter"
classname="org.apache.tools.ant.taskdefs.optional.perforce.P4Counter"
/>
- <taskdef name="p4reopen"
classname="org.apache.tools.ant.taskdefs.optional.perforce.P4Reopen"
/>
- <taskdef name="p4revert"
classname="org.apache.tools.ant.taskdefs.optional.perforce.P4Revert"
/>
+ <taskdef name="p4reopen"
classname="org.apache.tools.ant.taskdefs.optional.perforce.P4Reopen"
/>
+ <taskdef name="p4revert"
classname="org.apache.tools.ant.taskdefs.optional.perforce.P4Revert"
/>
+ <taskdef name="p4add"
classname="org.apache.tools.ant.taskdefs.optional.perforce.P4Add"
/>
</pre>
<hr>
@@ -198,7 +203,8 @@
<h2><a name="p4change">P4Change</a></h2>
<h3>Description:</h3>
<p>Request a new changelist from the Perforce server.
-This task sets the ${p4.change} property which can then be passed to P4Submit
or P4Edit.
+This task sets the ${p4.change} property which can then be passed to <A
HREF="#p4submit">P4Submit</A>,
+<A HREF="#p4edit">P4Edit</A>, or <a HREF="#p4add">P4Add</A>.
</p>
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
@@ -483,7 +489,47 @@
</pre>
<hr>
+<h2><a name="p4add">P4Add</a></h2>
+<h3>Description:</h3>
+<p>
+Adds files specified in nested fileset children.
+</p>
+<h3>Parameters</h3>
+<table border="1" cellpadding="2" cellspacing="0">
+ <tr>
+ <td valign="top"><b>Attribute</b></td>
+ <td valign="top"><b>Description</b></td>
+ <td align="center" valign="top"><b>Required</b></td>
+ </tr>
+ <tr>
+ <td valign="top">commandlength</td>
+ <td valign="top">A positive integer specifying the maximum length
+ of the commandline when calling Perforce to add the files.
+ Defaults to 450, higher values mean faster execution,
+ but also possible failures.</td>
+ <td valign="top" align="center">No</td>
+ </tr>
+ <tr>
+ <td valign="top">changelist</td>
+ <td valign="top">If specified the open files are associated with the
+specified pending changelist number; otherwise the open files are
+associated with the default changelist.</td>
+ <td valign="top" align="center">No</td>
+ </tr>
+
+</table>
+
+<h3>Examples</h3>
+Require a changelist, add all java files starting from a directory,
+and submit
+<pre>
+<p4change/>
+<p4add commandlength="20000"
changelist="${p4.change}">
+ <fileset dir="../dir/src/" includes="**/*.java"/>
+<p4add>
+<p4submit change="${p4.change}"/>
+</pre>
<h2><a name="changes">Change History</a></h2>
<table border="1" cellpadding="2" cellspacing="0">