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

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