You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

pvcstask.html 8.7 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <meta http-equiv="Content-Language" content="en-us">
  6. <title>PVCS task</title>
  7. </head>
  8. <body>
  9. <h1>
  10. Ant Pvcs Task User Manual</h1>
  11. by
  12. <br><!-- Names are in alphabetical order, on last name -->
  13. <ul>
  14. <li>Thomas Christensen (<a href="mailto:tchristensen@nordija.com">tchristensen@nordija.com</a>)</li>
  15. <li>Don Jeffery (<a href="mailto:donj@apogeenet.com">donj@apogeenet.com</a>)</li>
  16. </ul>
  17. Version 1.1 - 2001/06/27<br>
  18. <p>Problems with UNC pathnames and the use of () in paths are fixed and an updateonly
  19. argument introduced.</p>
  20. Version 1.0 - 2001/01/31<br>
  21. <p>Initial release.</p>
  22. <hr>
  23. <h2>
  24. Table of Contents</h2>
  25. <ul>
  26. <li><a href="#introduction">Introduction</a></li>
  27. <li><a href="#pvcs">Pvcs Task</a></li>
  28. </ul>
  29. <hr>
  30. <h2><a NAME="introduction">Introduction</a></h2>
  31. The pvcs task allows the user of ant to extract the latest edition
  32. of the source code from a PVCS repository. PVCS is a version control system
  33. developed by <a href="http://www.merant.com/products/pvcs">Merant</a>.
  34. <br>
  35. Before using this tag, the user running ant must have access to the commands
  36. of PVCS (get and pcli) and must have access to the repository. Note that the way to specify
  37. the repository is platform dependent so use property to specify location of repository.
  38. <br>
  39. This version has been tested agains PVCS version 6.5 and 6.6 under Windows and Solaris.
  40. <hr>
  41. <h2><a NAME="pvcs">Pvcs Task</a></h2>
  42. <h3>Description</h3>
  43. The pvcs task is set to point at a PVCS repository and optionally a project
  44. within that repository, and can from that specification get the latest
  45. version of the files contained by the repository.
  46. <h3>
  47. Parameters</h3>
  48. <table BORDER CELLSPACING=0 CELLPADDING=2 >
  49. <tr>
  50. <td VALIGN=TOP WIDTH="12%"><b>Attribute</b></td>
  51. <td VALIGN=TOP WIDTH="78%"><b>Description</b></td>
  52. <td VALIGN=TOP WIDTH="10%"><b>Required</b></td>
  53. </tr>
  54. <tr>
  55. <td VALIGN=TOP WIDTH="12%">repository</td>
  56. <td VALIGN=TOP WIDTH="78%">The location of the repository (see your PVCS
  57. manuals)</td>
  58. <td VALIGN=TOP WIDTH="10%">Yes</td>
  59. </tr>
  60. <tr>
  61. <td VALIGN=TOP WIDTH="12%">pvcsproject</td>
  62. <td VALIGN=TOP WIDTH="78%">The project within the PVCS repository to extract
  63. files from (&quot;/&quot; is root project and that is default if this attribute isn't
  64. specified)</td>
  65. <td VALIGN=TOP WIDTH="10%">No</td>
  66. </tr>
  67. <tr>
  68. <td VALIGN=TOP WIDTH="12%">label</td>
  69. <td VALIGN=TOP WIDTH="78%">Only files marked with this label are extracted.</td>
  70. <td VALIGN=TOP WIDTH="10%">No</td>
  71. </tr>
  72. <tr>
  73. <td VALIGN=TOP WIDTH="12%">promotiongroup</td>
  74. <td VALIGN=TOP WIDTH="78%">Only files within this promotion group are extracted. Using
  75. both the <i>label</i> and the <i>promotiongroup</i> tag will cause the files in the
  76. promotion group and with that label to be extracted.
  77. </td>
  78. <td VALIGN=TOP WIDTH="10%">No</td>
  79. </tr>
  80. <tr>
  81. <td VALIGN=TOP WIDTH="12%">force</td>
  82. <td VALIGN=TOP WIDTH="78%">If set to <i>yes</i> all files that exists and are writable are overwritten. Default <i>no</i> causes the files that are writable to be ignored. This stops the PVCS command <i>get</i> to stop asking questions!</td>
  83. <td VALIGN=TOP WIDTH="10%">No</td>
  84. </tr>
  85. <tr>
  86. <td VALIGN=TOP WIDTH="12%">workspace</td>
  87. <td VALIGN=TOP WIDTH="78%">By specifying a workspace, the files are extracted to that location. A PVCS workspace is a
  88. name for a location of the workfiles and isn't as such the location itself. You define the location for a workspace
  89. using the PVCS GUI clients. If this isn't specified the default workspace for the current user is used.</td>
  90. <td VALIGN=TOP WIDTH="10%">No</td>
  91. </tr>
  92. <tr>
  93. <td VALIGN=TOP WIDTH="12%">pvcsbin</td>
  94. <td VALIGN=TOP WIDTH="78%">On some systems the PVCS executables <i>pcli</i>
  95. and <i>get</i> are not found in the PATH. In such cases this attribute
  96. should be set to the bin directory of the PVCS installation containing
  97. the executables mentioned before. If this attribute isn't specified the
  98. tag expects the executables to be found using the PATH environment variable.</td>
  99. <td VALIGN=TOP WIDTH="10%">No</td>
  100. </tr>
  101. <tr>
  102. <td VALIGN=TOP WIDTH="12%">ignorereturncode</td>
  103. <td VALIGN=TOP WIDTH="78%">If set to <i>true</i> the return value from executing
  104. the pvcs commands are ignored.</td>
  105. <td VALIGN=TOP WIDTH="10%">No</td>
  106. </tr>
  107. <tr>
  108. <td VALIGN=TOP WIDTH="12%">updateonly</td>
  109. <td VALIGN=TOP WIDTH="78%">If set to <i>true</i> files are gotten only if
  110. newer than existing local files.</td>
  111. <td VALIGN=TOP WIDTH="10%">No</td>
  112. </tr>
  113. <tr>
  114. <td valign="TOP">filenameformat</td>
  115. <td valign="TOP">The format of your folder names in a
  116. format suitable for <code>java.text.MessageFormat</code>.
  117. Defaults to <code>{0}-arc({1})</code>. Repositories where
  118. the archive extension is not <code>-arc</code> should set
  119. this.</td>
  120. <td valign="TOP">No</td>
  121. </tr>
  122. <tr>
  123. <td valign="TOP">linestart</td>
  124. <td valign="TOP">Used to parse the output of the pcli
  125. command. It defaults to <code>&quot;P:</code>. The parser already
  126. knows about / and \\, this property is useful in cases where the
  127. repository is accessed on a Windows platform via a drive letter
  128. mapping.</td>
  129. <td valign="TOP">No</td>
  130. </tr>
  131. </table>
  132. <h3><a name="nested">Nested Elements</a></h3>
  133. <h3>pvcsproject element</h3>
  134. <p><code>pvcs</code> supports a nested
  135. <code>&lt;pvcsproject&gt;</code> element, that represents a project
  136. within the PVCS repository to extract files from. By nesting multiple
  137. <code>&lt;pvcsproject&gt;</code> elements under the
  138. <code>&lt;pvcs&gt;</code> task, multiple projects can be
  139. specified.</p>
  140. <h3>Parameters</h3>
  141. <table BORDER CELLSPACING=0 CELLPADDING=2 >
  142. <tr>
  143. <td VALIGN=TOP WIDTH="12%"><b>Attribute</b></td>
  144. <td VALIGN=TOP WIDTH="78%"><b>Description</b></td>
  145. <td VALIGN=TOP WIDTH="10%"><b>Required</b></td>
  146. </tr>
  147. <tr>
  148. <td VALIGN=TOP WIDTH="12%">name</td>
  149. <td VALIGN=TOP WIDTH="78%">The name of the pvcs project</td>
  150. <td VALIGN=TOP WIDTH="10%">Yes</td>
  151. </tr>
  152. </table>
  153. <h3>Examples</h3>
  154. The following set-up extracts the latest version of the files in the pvcs repository.
  155. <pre>
  156. &lt;!-- =================================================================== --&gt;
  157. &lt;!-- Get the latest version --&gt;
  158. &lt;!-- =================================================================== --&gt;
  159. &lt;target name=&quot;getlatest&quot;&gt;
  160. &lt;pvcs repository=&quot;/mnt/pvcs&quot; pvcsproject=&quot;/myprj&quot;/&gt;
  161. &lt;/target&gt;</ul>
  162. </pre>
  163. <p>Now run:</p>
  164. <code>ant getlatest</code>
  165. <p>This will cause the following output to appear:</p>
  166. <pre>
  167. getlatest:
  168. [pvcs] PVCS Version Manager (VMGUI) v6.6.10 (Build 870) for Windows NT/80x86
  169. [pvcs] Copyright 1985-2000 MERANT. All rights reserved.
  170. [pvcs] PVCS Version Manager (get) v6.6.10 (Build 870) for Windows NT/80x86
  171. [pvcs] Copyright 1985-2000 MERANT. All rights reserved.
  172. [pvcs] c:\myws\myprj\main.java &lt;- C:\mypvcs\archives\myprj\main.java-arc
  173. [pvcs] rev 1.1
  174. [pvcs] c:\myws\myprj\apache\tool.java &lt;- C:\mypvcs\archives\myprj\apache\tools.java-arc
  175. [pvcs] rev 1.5
  176. BUILD SUCCESSFUL
  177. Total time: 19 seconds</pre>
  178. This next example extracts the latest version of the files in the pvcs
  179. repository from two projects using nested &lt;pvcsproject&gt; elements.
  180. <pre>
  181. &lt;!-- ===================================================================--&gt;
  182. &lt;!-- Get latest from myprj and myprj2 --&gt;
  183. &lt;!-- ===================================================================--&gt;
  184. &lt;target name=&quot;getlatest2&quot;&gt;
  185. &lt;pvcs repository=&quot;/mnt/pvcs&quot;&gt;
  186. &lt;pvcsproject name=&quot;/myprj&quot;/&gt;
  187. &lt;pvcsproject name=&quot;/myprj2&quot;/&gt;
  188. &lt;/pvcs&gt;
  189. &lt;/target&gt;</ul>
  190. </pre>
  191. <p>Now run:</p>
  192. <code>ant getlatest2</code>
  193. <p>This will cause the following output to appear:</p>
  194. <pre>
  195. getlatest2:
  196. [pvcs] PVCS Version Manager (VMGUI) v6.6.10 (Build 870) for Windows NT/80x86
  197. [pvcs] Copyright 1985-2000 MERANT. All rights reserved.
  198. [pvcs] PVCS Version Manager (get) v6.6.10 (Build 870) for Windows NT/80x86
  199. [pvcs] Copyright 1985-2000 MERANT. All rights reserved.
  200. [pvcs] c:\myws\myprj\main.java &lt;- C:\mypvcs\archives\myprj\main.java-arc
  201. [pvcs] rev 1.1
  202. [pvcs] c:\myws\myprj\apache\tool.java &lt;- C:\mypvcs\archives\myprj\apache\tool.java-arc
  203. [pvcs] rev 1.5
  204. [pvcs] c:\myws\myprj2\apache\tool2.java &lt;- C:\mypvcs\archives\myprj2\apache\tool2.java-arc
  205. [pvcs] rev 1.2
  206. BUILD SUCCESSFUL
  207. Total time: 22 seconds</pre>
  208. <hr WIDTH="100%">
  209. <p align="center">Copyright &copy; 2001-2002 Apache Software
  210. Foundation. All rights Reserved.</p>
  211. <p>PVCS is a registered trademark of MERANT.</p>
  212. </body>
  213. </html>