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.3 kB

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