source: other-projects/trunk/realistic-books/packages/AntInstaller/web/manual/manual/OptionalTasks/perforce.html@ 19253

Last change on this file since 19253 was 19253, checked in by davidb, 15 years ago

Establishing a source code repository for Veronica's Realistic Book's software

File size: 32.5 KB
Line 
1<!--
2 Licensed to the Apache Software Foundation (ASF) under one or more
3 contributor license agreements. See the NOTICE file distributed with
4 this work for additional information regarding copyright ownership.
5 The ASF licenses this file to You under the Apache License, Version 2.0
6 (the "License"); you may not use this file except in compliance with
7 the License. You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16-->
17<html>
18<head>
19<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
20<title>Perforce Tasks</title>
21</head>
22<body>
23<h1>Perforce Tasks User Manual</h1>
24<p>by</p>
25<ul>
26 <li>Les Hughes (<a href="mailto:[email protected]">[email protected]</a>)</li>
27 <li>Kirk Wylie (<a href="mailto:[email protected]">[email protected]</a>)</li>
28 <li>Matt Bishop (<a href="mailto:[email protected]">[email protected]</a>)</li>
29 <li>Antoine Levy-Lambert</li>
30</ul>
31<hr>
32<h2>Contents</h2>
33<ul>
34 <li><a href="#intro">Introduction</a></li>
35 <li><a href="#tasks">The Tasks</a></li>
36 <li><a href="#changes">Change History</a></li>
37</ul>
38<br>
39<h2><a name="intro">Introduction</a></h2>
40<p>These tasks provide an interface to the <a href="http://www.perforce.com" target="_top">Perforce</a> SCM.
41The <code>org.apache.tools.ant.taskdefs.optional.perforce</code> package consists of a simple framework to support
42p4 functionality as well as some Ant tasks encapsulating frequently used (by me :-) p4 commands.
43However, the addition of new p4 commands is a pretty simple task (see the source).
44Although it is possible to use these commands on the desktop,
45they were primarily intended to be used by automated build systems.</p>
46
47<p><b>Note:</b> These tasks require the <a href="http://jakarta.apache.org/oro" target="_top">oro</a> regular
48expression package. See <a href="../install.html#librarydependencies">library dependencies</a> for the precise
49version required.
50You will also need the Perforce client executable (p4 or p4.exe but not p4win.exe) in your path.
51</p>
52
53
54
55<h2><a name="tasks">The Tasks</a></h2>
56
57<table border="0" cellspacing="0" cellpadding="3">
58 <tr>
59 <td><b>Task</b></td>
60 <td><b>Description</b></td>
61 </tr>
62 <tr>
63 <td><a href="#p4sync">P4Sync</a></td>
64 <td>Synchronise a workspace to a depot</td>
65 </tr>
66 <tr>
67 <td><a href="#p4change">P4Change</a></td>
68 <td>Request a new changelist from the Perforce server</td>
69 </tr>
70 <tr>
71 <td><a href="#p4edit">P4Edit</a></td>
72 <td>Open files for edit (checkout)</td>
73 </tr>
74 <tr>
75 <td><a href="#p4submit">P4Submit</a></td>
76 <td>Submit a changelist to the Perforce server (checkin)</td>
77 </tr>
78 <tr>
79 <td><a href="#p4have">P4Have</a></td>
80 <td>List current files in client view, useful for reporting</td>
81 </tr>
82 <tr>
83 <td><a href="#p4label">P4Label</a></td>
84 <td>Create a label reflecting files in the current workspace</td>
85 </tr>
86 <tr>
87 <td><a href="#p4labelsync">P4Labelsync</a></td>
88 <td>Syncs an existing label</td>
89 </tr>
90 <tr>
91 <td><a href="#p4counter">P4Counter</a></td>
92 <td>Obtain or set the value of a counter</td>
93 </tr>
94 <tr>
95 <td><a href="#p4reopen">P4Reopen</a></td>
96 <td>Move files between changelists</td>
97 </tr>
98
99 <tr>
100 <td><a href="#p4revert">P4Revert</a></td>
101 <td>Revert files</td>
102 </tr>
103
104 <tr>
105 <td><a href="#p4add">P4Add</a></td>
106 <td>Add files</td>
107 </tr>
108 <tr>
109 <td><a href="#p4delete">P4Delete</a></td>
110 <td>Delete files</td>
111 </tr>
112 <tr>
113 <td><a href="#p4integrate">P4Integrate</a></td>
114 <td>Integrate files</td>
115 </tr>
116 <tr>
117 <td><a href="#p4resolve">P4Resolve</a></td>
118 <td>Resolve files</td>
119 </tr>
120 <tr>
121 <td><a href="#p4fstat">P4Fstat</a></td>
122 <td>Show differences between local repository and p4 repository</td>
123 </tr>
124</table>
125
126<h3>General P4 Properties</h3>
127<p>Each p4 task requires a number of settings, either through build-wide properties, individual attributes
128or environment variables. These are
129</p>
130<table border="1" cellpadding="2" cellspacing="0">
131 <tr>
132 <td valign="top"><b>Property</b></td>
133 <td valign="top"><b>Attribute</b></td>
134 <td valign="top"><b>Env Var</b></td>
135 <td valign="top"><b>Description</b></td>
136 <td align="center" valign="top"><b>Default</b></td>
137 </tr>
138 <tr>
139 <td valign="top">p4.port</td>
140 <td valign="top">port</td>
141 <td valign="top">P4PORT</td>
142 <td valign="top">The p4d server and port to connect to</td>
143 <td valign="top">perforce:1666</td>
144 </tr>
145 <tr>
146 <td valign="top">p4.client</td>
147 <td valign="top">client</td>
148 <td valign="top">P4CLIENT</td>
149 <td valign="top">The p4 client spec to use</td>
150 <td valign="top">The logged in username</td>
151 </tr>
152 <tr>
153 <td valign="top">p4.user</td>
154 <td valign="top">user</td>
155 <td valign="top">P4USER</td>
156 <td valign="top">The p4 username</td>
157 <td valign="top">The logged in username</td>
158 </tr>
159<tr>
160 <td valign="top" align="center">--</td>
161 <td valign="top">view</td>
162 <td valign="top" align="center">--</td>
163 <td valign="top">The client, branch or label view to operate upon. See the p4 user guide for more info.</td>
164 <td valign="top">//...</td>
165 </tr>
166
167</table>
168<p> Your local installation of Perforce may require other settings (e.g.
169P4PASSWD, P4CONFIG). Many of these settings can be set using the globalopts
170attribute (described below), but not all. If a setting cannot be set
171by the command-line options, then it can only be set outside of Ant as an
172environment variable.
173</p>
174<p>
175Additionally, you may also specify the following attributes:
176</p>
177<p>
178<table border="1" cellpadding="2" cellspacing="0">
179<tr>
180 <td valign="top"><b>Attribute</b></td>
181 <td valign="top"><b>Description</b></td>
182 <td align="center" valign="top"><b>Required</b></td>
183</tr>
184<tr>
185 <td valign="top">failonerror</td>
186 <td valign="top">Specifies whether to stop the build
187 (<code>true</code>|<code>yes</code>|<code>on</code>)
188 or keep going (<code>false</code>|<code>no</code>|<code>off</code>)
189 if an error is returned from the p4 command.</td>
190 <td valign="top">No; defaults to true.</td>
191 </tr>
192 <tr>
193 <td valign="top">globalopts<br></td>
194 <td valign="top">Specifies global options for perforce to use while
195 executing the task. These properties should be concatenated into one
196 string,<br>
197 such as "-P <i>password</i> -C EUCJIS". Use the command-line option
198 syntax, NOT the environment variable names. See the<br>
199 Perforce Command Reference for details.</td>
200 <td valign="top">No<br></td>
201 </tr>
202</table>
203</p>
204
205<h3>Examples</h3>
206<p>Setting in the environment:-</p>
207<p>
208(Unix csh)</p>
209<pre>setenv P4PORT myperforcebox:1666</pre>
210<p>(Unix sh et al)</p>
211<pre>P4USER=myp4userid; export P4USER</pre>
212<p>Using build properties:-</p>
213<pre>&lt;property name=&quot;p4.client&quot; value=&quot;nightlybuild&quot;/&gt;</pre>
214<p>Using task attributes:-</p>
215<pre>
216&lt;p4Whatever
217 port=&quot;myserver:1666&quot;
218 client=&quot;smoketest&quot;
219 user=&quot;smoketestdude&quot;
220 .
221 .
222 .
223/&gt;
224</pre>
225
226<p>
227For more information regarding the underlying 'p4' commands you are referred to the Perforce Command Reference
228available from the <a href="http://www.perforce.com/" target="_top">Perforce website</a>.
229</p>
230
231
232<hr>
233<h2>Task Descriptions</h2>
234<h2><a name="p4sync">P4Sync</a></h2>
235<h3>Description:</h3>
236<p>Synchronize the current workspace with the depot.</p>
237
238<h3>Parameters</h3>
239<table border="1" cellpadding="2" cellspacing="0">
240 <tr>
241 <td valign="top"><b>Attribute</b></td>
242 <td valign="top"><b>Description</b></td>
243 <td align="center" valign="top"><b>Required</b></td>
244 </tr>
245 <tr>
246 <td valign="top">force</td>
247 <td valign="top">force a refresh of files, if this attribute has
248 been set.</td>
249 <td valign="top" align="center">no - if omitted, it will be off,
250 otherwise a refresh will be forced.</td>
251 </tr>
252<tr>
253 <td valign="top">label</td>
254 <td valign="top">sync client to label</td>
255 <td valign="top" align="center">no</td>
256 </tr>
257</table>
258
259<h3>Examples</h3>
260<pre>&lt;p4sync label=&quot;nightlybuild-0.0123&quot; force=&quot;foo&quot;/&gt;
261&lt;p4sync view=&quot;//depot/projects/projectfoo/main/src/...&quot;/&gt;
262</pre>
263<hr>
264
265
266
267<h2><a name="p4change">P4Change</a></h2>
268<h3>Description:</h3>
269<p>Request a new changelist from the Perforce server.
270This task sets the ${p4.change} property which can then be passed to <A HREF="#p4submit">P4Submit</A>,
271<A HREF="#p4edit">P4Edit</A>, or <a HREF="#p4add">P4Add</A>, or <a HREF="#p4delete">P4Delete</A>,
272then to <A HREF="#p4submit">P4Submit</A>.
273</p>
274<h3>Parameters</h3>
275<table border="1" cellpadding="2" cellspacing="0">
276 <tr>
277 <td valign="top"><b>Attribute</b></td>
278 <td valign="top"><b>Description</b></td>
279 <td align="center" valign="top"><b>Required</b></td>
280 </tr>
281 <tr>
282 <td valign="top">description</td>
283 <td valign="top">Description for ChangeList. If none specified, it will
284 default to "AutoSubmit By Ant"</td>
285 <td valign="top" align="center">No.</td>
286 </tr>
287</table>
288
289<h3>Examples</h3>
290<pre>&lt;p4change description="Change Build Number in Script"&gt;
291</pre>
292<hr>
293
294
295
296
297<h2><a name="p4edit">P4Edit</a></h2>
298<h3>Description:</h3>
299<p>Open file(s) for edit. P4Change should be used to obtain a new changelist for P4Edit as,
300although P4Edit can open files to the default change, P4Submit cannot yet submit it.
301</p>
302<h3>Parameters</h3>
303<table border="1" cellpadding="2" cellspacing="0">
304 <tr>
305 <td valign="top"><b>Attribute</b></td>
306 <td valign="top"><b>Description</b></td>
307 <td align="center" valign="top"><b>Required</b></td>
308 </tr>
309 <tr>
310 <td valign="top">view</td>
311 <td valign="top">The filespec to request to edit</td>
312 <td valign="top" align="center">Yes</td>
313 </tr>
314 <tr>
315 <td valign="top">change</td>
316 <td valign="top">An existing changelist number to assign files to.</td>
317 <td valign="top" align="center">No, but see above.</td>
318 </tr>
319
320</table>
321
322<h3>Examples</h3>
323<pre>
324&lt;p4edit
325 view=&quot;//depot/projects/projectfoo/main/src/Blah.java...&quot;
326 change=&quot;${p4.change}&quot;/&gt;
327</pre>
328<hr>
329
330
331
332
333<h2><a name="p4submit">P4Submit</a></h2>
334<h3>Description:</h3>
335<p>Submit a changelist, usually obtained from P4Change.
336<p>P4Submit will also change the value of the property p4.change if the change list is renamed by the Perforce server.
337<p>P4Submit will set a property p4.needsresolve to 1 if the change could not be submitted due to files needing resolving.
338<p>Files will need resolve if at the time of checking in, the revision that was checked out to do the current edit
339is not the latest any more.
340<p>If no files need resolve, the p4.needsresolve will be set to 0.
341</p>
342<h3>Parameters</h3>
343<table border="1" cellpadding="2" cellspacing="0">
344 <tr>
345 <td valign="top"><b>Attribute</b></td>
346 <td valign="top"><b>Description</b></td>
347 <td align="center" valign="top"><b>Required</b></td>
348 </tr>
349 <tr>
350 <td valign="top">change</td>
351 <td valign="top">The changelist number to submit</td>
352 <td valign="top" align="center">Yes</td>
353 </tr>
354 <tr>
355 <td valign="top">changeproperty</td>
356 <td valign="top">Name of a property to which the new change number
357 will be assigned if the Perforce server renumbers the change<br>
358 Since ant 1.6.1</td>
359 <td valign="top" align="center">No</td>
360 </tr>
361 <tr>
362 <td valign="top">needsresolveproperty</td>
363 <td valign="top">Name of property which will be set to <code>true</code>
364 if the submit requires a resolve<br>
365 Since ant 1.6.1</td>
366 <td valign="top" align="center">No</td>
367 </tr>
368</table>
369
370<h3>Examples</h3>
371<pre>&lt;p4submit change=&quot;${p4.change}&quot;/&gt;
372</pre>
373<hr>
374
375
376
377
378<h2><a name="p4have">P4Have</a></h2>
379<h3>Description:</h3>
380<p>List handy file info reflecting the current client contents.
381</p>
382<h3>Parameters</h3>
383<table border="1" cellpadding="2" cellspacing="0">
384 <tr>
385 <td valign="top"><b>Attribute</b></td>
386 <td valign="top"><b>Description</b></td>
387 <td align="center" valign="top"><b>Required</b></td>
388 </tr>
389 <tr>
390 <td valign="top">None</td>
391 <td valign="top" align="center">--</td>
392 <td valign="top" align="center">--</td>
393 </tr>
394</table>
395
396<h3>Examples</h3>
397<pre>&lt;p4have/&gt;
398</pre>
399<hr>
400
401
402
403
404<h2><a name="p4label">P4Label</a></h2>
405<h3>Description:</h3>
406<p>Create a new label and set contents to reflect current client file revisions.
407</p>
408<h3>Parameters</h3>
409<table border="1" cellpadding="2" cellspacing="0">
410 <tr>
411 <td valign="top"><b>Attribute</b></td>
412 <td valign="top"><b>Description</b></td>
413 <td align="center" valign="top"><b>Required</b></td>
414 </tr>
415 <tr>
416 <td valign="top">name</td>
417 <td valign="top">The name of the label</td>
418 <td valign="top" align="center">Yes</td>
419 </tr>
420 <tr>
421 <td valign="top">view</td>
422 <td valign="top">client view to use for label<br>
423 The view can contain multiple lines separated by ; or :</td>
424 <td valign="top" align="center">No</td>
425 </tr>
426 <tr>
427 <td valign="top">desc</td>
428 <td valign="top">Label Description</td>
429 <td valign="top" align="center">No</td>
430 </tr>
431 <tr>
432 <td valign="top">lock</td>
433 <td valign="top">Lock the label once created.</td>
434 <td valign="top" align="center">No</td>
435 </tr>
436
437
438</table>
439<h3>Examples</h3>
440<pre>
441&lt;p4label
442 name=&quot;NightlyBuild:${DSTAMP}:${TSTAMP}&quot;
443 desc=&quot;Auto Nightly Build&quot;
444 lock=&quot;locked&quot;
445 view=&quot;//firstdepot/...;//secondepot/foo/bar/...&quot;
446/&gt;
447</pre>
448<hr>
449
450
451<h2><a name="p4labelsync">P4Labelsync</a></h2>
452<h3>Description:</h3>
453<p>Syncs an existing label against the current workspace or against specified revisions.
454</p>
455<h3>Parameters</h3>
456<table border="1" cellpadding="2" cellspacing="0">
457 <tr>
458 <td valign="top"><b>Attribute</b></td>
459 <td valign="top"><b>Description</b></td>
460 <td align="center" valign="top"><b>Required</b></td>
461 <td align="center" valign="top"><b>Perforce command line flag</b></td>
462 </tr>
463 <tr>
464 <td valign="top">name</td>
465 <td valign="top">The name of the label</td>
466 <td valign="center" align="center">Yes</td>
467 <td valign="top" align="center">-l labelname</td>
468 </tr>
469 <tr>
470 <td valign="top">view</td>
471 <td valign="top">
472 list of files or revision specs separated by : or ;<br>
473 in the absence of this attribute, the labelsync will be done against the current Perforce client or the value of the p4client attribute or the value of the p4.client property or the value of the environment variable P4CLIENT</td>
474 <td valign="center" align="center">No</td>
475 <td valign="center" align="center">file[revRange] ... </td>
476 </tr>
477 <tr>
478 <td valign="top">simulationmode</td>
479 <td valign="top">Displays which effect the operation would have on the label but do not actually do it</td>
480 <td valign="center" align="center">No</td>
481 <td valign="top" align="center">-n</td>
482 </tr>
483 <tr>
484 <td valign="top">add</td>
485 <td valign="top">If set to true, preserve files which exist in the label, but not in the current view</td>
486 <td valign="center" align="center">No</td>
487 <td valign="top" align="center">-a</td>
488 </tr>
489 <tr>
490 <td valign="top">delete</td>
491 <td valign="top">If set to true, remove from the label the files mentioned in the view attribute</td>
492 <td valign="center" align="center">No</td>
493 <td valign="top" align="center">-d</td>
494 </tr>
495
496
497</table>
498<h3>Examples</h3>
499<pre>
500&lt;
501p4labelsync
502name=&quot;current_release&quot;
503view="//depot/...#head;//depot2/file1#25"
504add=&quot;true&quot;
505/&gt;
506</pre>
507This example will add into the label called <i>current_release</i> the current head revision of all the files located under <i>//depot</i>
508and the revision 25 of the file <i>//depot2/file1</i>.
509<pre>
510&lt;
511p4labelsync
512name=&quot;current_release&quot;
513p4client=&quot;myclient&quot;
514/&gt;
515</pre>
516This example will update the label called <i>current_release</i> so that it reflects the Perforce client <i>myclient</i>.<br>
517Files present in the label before the sync and not present currently in the client will be removed from the label, because the add attribute is not set.
518<pre>
519&lt;
520p4labelsync
521name=&quot;current_release&quot;
522/&gt;
523</pre>
524This example will update the label called <i>current_release</i> so that it reflects the current default client for the ant Perforce tasks.<br>
525The default client is by order of priority :
526<ul>
527<li>
528the value of the p4.client property if set in the project
529</li>
530<li>
531the value of the P4CLIENT environment variable
532</li>
533<li>
534the default Perforce client from the Windows registry under Windows operating systems
535</li>
536</ul>
537Files present in the label before the sync and not present currently in the client will be removed from the label, because the add attribute is not set.
538<hr>
539
540
541<h2><a name="p4counter">P4Counter</a></h2>
542<h3>Description:</h3>
543<p>
544Obtain or set the value of a counter. When used in its base form
545(where only the counter name is provided), the counter value will be
546printed to the output stream. When the value is provided, the counter
547will be set to the value provided. When a property name is provided,
548the property will be filled with the value of the counter. You may
549not specify to both get and set the value of the counter in the same
550Task.
551</p>
552<P>
553The user performing this task must have Perforce &quot;review&quot; permissions
554as defined by Perforce protections in order for this task to succeed.
555</P>
556<h3>Parameters</h3>
557<table border="1" cellpadding="2" cellspacing="0">
558 <tr>
559 <td valign="top"><b>Attribute</b></td>
560 <td valign="top"><b>Description</b></td>
561 <td align="center" valign="top"><b>Required</b></td>
562 </tr>
563 <tr>
564 <td valign="top">name</td>
565 <td valign="top">The name of the counter</td>
566 <td valign="top" align="center">Yes</td>
567 </tr>
568 <tr>
569 <td valign="top">value</td>
570 <td valign="top">The new value for the counter</td>
571 <td valign="top" align="center">No</td>
572 </tr>
573 <tr>
574 <td valign="top">property</td>
575 <td valign="top">The property to be set with the value of the counter</td>
576 <td valign="top" align="center">No</td>
577 </tr>
578</table>
579
580<h3>Examples</h3>
581Print the value of the counter named &quot;last-clean-build&quot; to the output stream:
582<pre>
583&lt;p4counter name=&quot;last-clean-build&quot;/&gt;
584</PRE>
585Set the value of the counter based on the value of the &quot;TSTAMP&quot; property:
586<PRE>
587&lt;p4counter name=&quot;last-clean-build&quot; value=&quot;${TSTAMP}&quot;/&gt;
588</PRE>
589Set the value of the &quot;p4.last.clean.build&quot; property to the current
590value of the &quot;last-clean-build&quot; counter:
591<PRE>
592&lt;p4counter name=&quot;last-clean-build&quot; property=&quot;p4.last.clean.build&quot;/&gt;
593</pre>
594<hr>
595
596
597
598
599<h2><a name="p4reopen">P4Reopen</a></h2>
600<h3>Description:</h3>
601<p>
602Move (or reopen in Perforce speak) checkout files between changelists.
603</p>
604<h3>Parameters</h3>
605<table border="1" cellpadding="2" cellspacing="0">
606 <tr>
607 <td valign="top"><b>Attribute</b></td>
608 <td valign="top"><b>Description</b></td>
609 <td align="center" valign="top"><b>Required</b></td>
610 </tr>
611 <tr>
612 <td valign="top">tochange</td>
613 <td valign="top">The changelist to move files to.</td>
614 <td valign="top" align="center">Yes</td>
615 </tr>
616</table>
617
618<h3>Examples</h3>
619Move all open files to the default changelist
620<pre>
621&lt;p4reopen view=&quot;//...&quot; tochange=&quot;default&quot;/&gt;
622</PRE>
623Create a new changelist then reopen into it, any files from the view //projects/foo/main/...
624<PRE>
625&lt;p4change description="Move files out of the way"/&gt;
626&lt;p4reopen view=&quot;//projects/foo/main/...&quot; tochange=&quot;${p4.change}&quot;/&gt;
627</pre>
628<hr>
629
630
631
632<h2><a name="p4revert">P4Revert</a></h2>
633<h3>Description:</h3>
634<p>
635Reverts files.
636</p>
637<h3>Parameters</h3>
638<table border="1" cellpadding="2" cellspacing="0">
639 <tr>
640 <td valign="top"><b>Attribute</b></td>
641 <td valign="top"><b>Description</b></td>
642 <td align="center" valign="top"><b>Required</b></td>
643 </tr>
644 <tr>
645 <td valign="top">change</td>
646 <td valign="top">The changelist to revert.</td>
647 <td valign="top" align="center">No</td>
648 </tr>
649 <tr>
650 <td valign="top">revertOnlyUnchanged</td>
651 <td valign="top">Revert only unchanged files (p4 revert -a)</td>
652 <td valign="top" align="center">No</td>
653 </tr>
654
655</table>
656
657<h3>Examples</h3>
658Revert everything!
659<pre>
660&lt;p4revert view=&quot;//...&quot;/&gt;
661</PRE>
662Revert any unchanged files in the default change
663<PRE>
664&lt;p4revert change="default" revertonlyunchanged=&quot;true&quot;/&gt;
665</pre>
666<hr>
667
668<h2><a name="p4add">P4Add</a></h2>
669<h3>Description:</h3>
670<p>
671Adds files specified in nested fileset children.
672</p>
673<h3>Parameters</h3>
674<table border="1" cellpadding="2" cellspacing="0">
675 <tr>
676 <td valign="top"><b>Attribute</b></td>
677 <td valign="top"><b>Description</b></td>
678 <td align="center" valign="top"><b>Required</b></td>
679 </tr>
680 <tr>
681 <td valign="top">commandlength</td>
682 <td valign="top">A positive integer specifying the maximum length
683 of the commandline when calling Perforce to add the files.
684 Defaults to 450, higher values mean faster execution,
685 but also possible failures.</td>
686 <td valign="top" align="center">No</td>
687 </tr>
688 <tr>
689 <td valign="top">changelist</td>
690 <td valign="top">If specified the open files are associated with the
691specified pending changelist number; otherwise the open files are
692associated with the default changelist.</td>
693 <td valign="top" align="center">No</td>
694 </tr>
695
696</table>
697
698<h3>Examples</h3>
699Require a changelist, add all java files starting from a directory,
700and submit
701
702<pre>
703&lt;p4change/&gt;
704&lt;p4add commandlength=&quot;20000&quot; changelist=&quot;${p4.change}&quot;&gt;
705 &lt;fileset dir=&quot;../dir/src/&quot; includes=&quot;**/*.java&quot;/&gt;
706&lt;p4add&gt;
707&lt;p4submit change=&quot;${p4.change}&quot;/&gt;
708</pre>
709<hr>
710
711<h2><a name="p4fstat">P4Fstat</a></h2>
712<h3>Description:</h3>
713<p>
714Lists files under Perforce control and files not under Perforce control in one or several filesets
715</p>
716<h3>Parameters</h3>
717<table border="1" cellpadding="2" cellspacing="0">
718 <tr>
719 <td valign="top"><b>Attribute</b></td>
720 <td valign="top"><b>Description</b></td>
721 <td align="center" valign="top"><b>Required</b></td>
722 </tr>
723 <tr>
724 <td valign="top">showfilter</td>
725 <td valign="top">should be one of
726 <table border="1">
727 <tr><td>value</td><td>description</td></tr>
728 <tr><td>&quot;all&quot;</td><td>list all files, first the ones which are under Perforce control, then the others</td></tr>
729 <tr><td>&quot;existing&quot;</td><td>list only files under Perforce control</td></tr>
730 <tr><td>&quot;non-existing&quot;</td><td>list only files which are not under Perforce control</td></tr></table>
731 </td>
732 <td valign="top" align="center">Yes</td>
733 </tr>
734 <tr>
735 <td valign="top">fileset</td>
736 <td valign="top">one or several <a href="../CoreTypes/fileset.html">fileset(s)</a></td>
737 <td valign="top" align="center">yes (at least one fileset is needed)</td>
738 </tr>
739</table>
740Several nested filesets can be used with P4Fstat, one should be there at least.
741<h3>Examples</h3>
742will list all the files under C:\dev\gnu\depot, sorted by under Perforce or not under Perforce<br>
743<pre>
744&lt;project name=&quot;p4fstat&quot; default=&quot;p4fstat&quot; basedir=&quot;C:\dev\gnu&quot;&gt;
745 &lt;target name=&quot;p4fstat&quot; &gt;
746 &lt;p4fstat showfilter=&quot;all&quot;&gt;
747 &lt;fileset dir=&quot;depot&quot; includes=&quot;**/*&quot;/&gt;
748 &lt;/p4fstat&gt;
749 &lt;/target&gt;
750&lt;/project&gt;</p>
751</pre>
752
753
754
755
756<h2><a name="p4delete">P4Delete</a></h2>
757<h3>Description:</h3>
758<p>Open file(s) for delete. P4Change should be used to obtain a new changelist for P4Delete as,
759although P4Delete can open files to the default change, P4Submit cannot yet submit it.
760</p>
761<h3>Parameters</h3>
762<table border="1" cellpadding="2" cellspacing="0">
763 <tr>
764 <td valign="top"><b>Attribute</b></td>
765 <td valign="top"><b>Description</b></td>
766 <td align="center" valign="top"><b>Required</b></td>
767 </tr>
768 <tr>
769 <td valign="top">view</td>
770 <td valign="top">The filespec to request to delete</td>
771 <td valign="top" align="center">Yes</td>
772 </tr>
773 <tr>
774 <td valign="top">change</td>
775 <td valign="top">An existing changelist number to assign files to.</td>
776 <td valign="top" align="center">No, but see above.</td>
777 </tr>
778
779</table>
780
781<h3>Examples</h3>
782<pre>
783&lt;p4delete
784 view=&quot;//depot/projects/projectfoo/main/src/Blah.java...&quot;
785 change=&quot;${p4.change}&quot;/&gt;
786</pre>
787<hr>
788<h2><a name="p4integrate">P4Integrate</a></h2>
789<h3>Description:</h3>
790<p>Open file(s) for integrate. P4Change should be used to obtain a new changelist for P4Integrate as,
791although P4Integrate can open files to the default change, P4Submit cannot yet submit it.
792</p>
793<h3>Parameters</h3>
794<p>If this task is used without using a branch definition, both fromfile and tofile must be supplied.
795If a branch definition is supplied, at least one of fromfile or tofile should be supplied.
796Both fromfile and tofile can be supplied together with a branch definition.</p>
797<table border="1" cellpadding="2" cellspacing="0">
798 <tr>
799 <td valign="top"><b>Attribute</b></td>
800 <td valign="top"><b>Description</b></td>
801 <td align="center" valign="top"><b>Required</b></td>
802 <td align="center" valign="top"><b>Perforce command line flag</b></td>
803 </tr>
804 <tr>
805 <td valign="top">fromfile</td>
806 <td valign="top">Original file or view</td>
807 <td valign="top" align="center">required if a branch is not specified</td>
808 <td valign="top" align="center"></td>
809 </tr>
810 <tr>
811 <td valign="top">tofile</td>
812 <td valign="top">Target file or view.</td>
813 <td valign="top" align="center">required if a branch is not specified</td>
814 <td valign="top" align="center"></td>
815 </tr>
816 <tr>
817 <td valign="top">branch</td>
818 <td valign="top">Name of branch specification</td>
819 <td valign="center">No</td>
820 <td valign="top" align="center">-b</td>
821 </tr>
822 <tr>
823 <td valign="top">change</td>
824 <td valign="top">An existing changelist number to assign files to.</td>
825 <td valign="top" align="center">No, but see above.</td>
826 <td valign="top" align="center">-c</td>
827 </tr>
828 <tr>
829 <td valign="top">forceintegrate</td>
830 <td valign="top">Forces integration regardless of previous integration history (*)</td>
831 <td valign="center">No</td>
832 <td valign="top" align="center">-f</td>
833 </tr>
834 <tr>
835 <td valign="top">restoredeletedrevisions</td>
836 <td valign="top">Enables integration around deleted revisions (*)</td>
837 <td valign="center">No</td>
838 <td valign="top" align="center">-d</td>
839 </tr>
840 <tr>
841 <td valign="top">leavetargetrevision</td>
842 <td valign="top">Prevents target files from being synced to head revision before integration (*)</td>
843 <td valign="center">No</td>
844 <td valign="top" align="center">-h</td>
845 </tr>
846 <tr>
847 <td valign="top">enablebaselessmerges</td>
848 <td valign="top">Forces integration to existing target files which have no integration history relative to the source files (*)</td>
849 <td valign="center">No</td>
850 <td valign="top" align="center">-i</td>
851 </tr>
852 <tr>
853 <td valign="top">simulationmode</td>
854 <td valign="top">Displays which integrations are necessary but do not actually schedule them (*)</td>
855 <td valign="center">No</td>
856 <td valign="top" align="center">-n</td>
857 </tr>
858 <tr>
859 <td valign="top">reversebranchmappings</td>
860 <td valign="top">Reverses mappings in the branch view, with source and target files exchanging place (*)</td>
861 <td valign="center">No</td>
862 <td valign="top" align="center">-r</td>
863 </tr>
864 <tr>
865 <td valign="top">propagatesourcefiletype</td>
866 <td valign="top">Makes source file type propagate to existing target files (*)</td>
867 <td valign="center">No</td>
868 <td valign="top" align="center">-t</td>
869 </tr>
870 <tr>
871 <td valign="top">nocopytargetfiles</td>
872 <td valign="top">Prevents the physical delivery on disk of new target files (*)</td>
873 <td valign="center">No</td>
874 <td valign="top" align="center">-v</td>
875 </tr>
876</table>
877<br>
878(*) The following applies for a number of flags. The default is false. To set the flag, use &quot;true&quot;
879
880<h3>Examples</h3>
881<pre>
882&lt;p4integrate
883 fromfile=&quot;//depot/projects/projectfoo/main/src/Blah.java...&quot;
884 tofile=&quot;//depot/projects/projectfoo/release/src/Blah.java...&quot;
885 change=&quot;${p4.change}&quot;/&gt;
886</pre>
887<hr>
888<h2><a name="p4resolve">P4Resolve</a></h2>
889<h3>Description:</h3>
890<p>Resolves files. You want to do this if :
891<ul>
892<li>
893there have been or there may be concurrent edits of the same file. For instance, you have begun to edit a file, and while you were working on it, somebody has submitted a new version of the same file. When you first attempt to submit your file(s), you will get a message (property p4.needsresolve set).
894</li>
895<li>
896you have just been doing an integration to existing target files
897</li>
898</ul>
899P4Resolve does not use a change list number (it takes it from the files it is working on).
900</p>
901<h3>Parameters</h3>
902<table border="1" cellpadding="2" cellspacing="0">
903 <tr>
904 <td valign="top"><b>Attribute</b></td>
905 <td valign="top"><b>Description</b></td>
906 <td align="center" valign="top"><b>Required</b></td>
907 <td align="center" valign="top"><b>Perforce command line flag</b></td>
908 </tr>
909 <tr>
910 <td valign="top">view</td>
911 <td valign="top">The filespec to request to delete</td>
912 <td valign="top" align="center">Yes</td>
913 <td valign="top" align="center"></td>
914 </tr>
915 <tr>
916 <td valign="top">resolvemode</td>
917 <td valign="top">Should have one of these values :
918 <ul>
919 <li>&quot;automatic&quot;</li>
920 <li>&quot;force&quot;</li>
921 <li>&quot;safe&quot;</li>
922 <li>&quot;theirs&quot;</li>
923 <li>&quot;yours&quot;</li>
924 </ul></td>
925 <td valign="top" align="center">Yes</td>
926 <td valign="top" align="center">corresponds to one of -am -af -as -at -ay </td>
927 </tr>
928 <tr>
929 <td valign="top">redoall</td>
930 <td valign="top">allows previously resolved files to be resolved again (*)</td>
931 <td valign="top" align="center">No</td>
932 <td valign="top" align="center">-f</td>
933 </tr>
934 <tr>
935 <td valign="top">simulationmode</td>
936 <td valign="top">Lists the integrations which would be performed, without actually doing them. (*)</td>
937 <td valign="top" align="center">No</td>
938 <td valign="top" align="center">-n</td>
939 </tr>
940 <tr>
941 <td valign="top">forcetextmode</td>
942 <td valign="top">Attempts a textual merge, even for binary files (*)</td>
943 <td valign="top" align="center">No</td>
944 <td valign="top" align="center">-t</td>
945 </tr>
946 <tr>
947 <td valign="top">markersforall</td>
948 <td valign="top">Puts in markers for all changes, conflicting or not (*)</td>
949 <td valign="top" align="center">No</td>
950 <td valign="top" align="center">-v</td>
951 </tr>
952</table>
953<br>
954(*) The following applies for a number of flags. The default is false. To set the flag, use &quot;true&quot;
955
956<h3>Examples</h3>
957<pre>
958&lt;p4resolve
959 view=&quot;//depot/projects/projectfoo/main/src/Blah.java...&quot;
960 resolvemode=&quot;automatic&quot;/&gt;
961</pre>
962
963<h2><a name="changes">Change History</a></h2>
964<table border="1" cellpadding="2" cellspacing="0">
965<tr>
966 <td valign="top">Sept 2000</td>
967 <td valign="top" align="center">--</td>
968 <td valign="top">Internal Release within Rubus</td>
969</tr>
970
971<tr>
972 <td valign="top">Nov 2000</td>
973 <td valign="top">V1.0</td>
974 <td valign="top">Initial Release donated to ASF :-)</td>
975</tr>
976<tr>
977 <td valign="top">Jan 2001</td>
978 <td valign="top">V1.1</td>
979 <td valign="top">Fixed cross platform (NT/Unix) bug<br>
980 Refactored p4 output handling code<br>
981 Refactored exec'ing code</td>
982</tr>
983<tr>
984 <td valign="top">Jan 2003</td>
985 <td valign="top">V1.2</td>
986 <td valign="top">Added globalopts to P4Base to allow
987 additional global options to be set.<br>
988 Added p4fstat task</td>
989</tr>
990<tr>
991 <td valign="top">May 2003</td>
992 <td valign="top">V1.3</td>
993 <td valign="top">Added p4labelsync, p4resolve, p4integrate.<br>
994 Changed p4submit (detection of changes of change numbers,
995 and of failed submits due to resolution needed)</td>
996</tr>
997<tr>
998 <td valign="top">Jan 2004</td>
999 <td valign="top">ant 1.6.1</td>
1000 <td valign="top">
1001Changed p4submit, needsresolveproperty and changeproperty added</td>
1002</tr>
1003</table>
1004
1005</body>
1006</html>
Note: See TracBrowser for help on using the repository browser.