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 10 KiB

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