source: release-kits/lirk3/resources/gs3-release-maker/apache-ant-1.6.5/docs/manual/OptionalTasks/perforce.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

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