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.2 KiB

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