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.

cvs.html 6.1 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>CVS Task</title>
  5. </head>
  6. <body>
  7. <h2><a name="cvs">Cvs</a></h2>
  8. <h3>Description</h3>
  9. <p>Handles packages/modules retrieved from a
  10. <a href="http://www.cvshome.org/" target="_top">CVS</a> repository.</p>
  11. <p>When doing automated builds, the <a href="get.html">get task</a> should be
  12. preferred over the <i>checkout</i> command, because of speed.</p>
  13. <h3>Parameters</h3>
  14. <table border="1" cellpadding="2" cellspacing="0">
  15. <tr>
  16. <td valign="top"><b>Attribute</b></td>
  17. <td valign="top"><b>Description</b></td>
  18. <td align="center" valign="top"><b>Required</b></td>
  19. </tr>
  20. <tr>
  21. <td valign="top">command</td>
  22. <td valign="top">the CVS command to execute.</td>
  23. <td align="center" valign="top">No, default &quot;checkout&quot;.</td>
  24. </tr>
  25. <tr>
  26. <td valign="top">compression</td>
  27. <td valign="top"><code>true</code> or <code>false</code> - if set
  28. to true, this is the same as compressionlevel=&quot;3&quot;</td>
  29. <td align="center" valign="top">No. Defaults to false.</td>
  30. </tr>
  31. <tr>
  32. <td valign="top">compressionlevel</td>
  33. <td valign="top">A number between 1 and 9 (corresponding to
  34. possible values for CVS&apos; <code>-z#</code> argument). Any
  35. other value is treated as compression=&quot;false&quot;</td>
  36. <td align="center" valign="top">No. Defaults to no compression.</td>
  37. </tr>
  38. <tr>
  39. <td valign="top">cvsRoot</td>
  40. <td valign="top">the CVSROOT variable.</td>
  41. <td align="center" valign="top">No</td>
  42. </tr>
  43. <tr>
  44. <td valign="top">cvsRsh</td>
  45. <td valign="top">the CVS_RSH variable.</td>
  46. <td align="center" valign="top">No</td>
  47. </tr>
  48. <tr>
  49. <td valign="top">dest</td>
  50. <td valign="top">the directory where the checked out files should be placed.</td>
  51. <td align="center" valign="top">No, default is project's basedir.</td>
  52. </tr>
  53. <tr>
  54. <td valign="top">package</td>
  55. <td valign="top">the package/module to check out.</td>
  56. <td align="center" valign="top">No</td>
  57. </tr>
  58. <tr>
  59. <td valign="top">tag</td>
  60. <td valign="top">the tag of the package/module to check out.</td>
  61. <td align="center" valign="top">No</td>
  62. </tr>
  63. <tr>
  64. <td valign="top">date</td>
  65. <td valign="top">Use the most recent revision no later than the given date</td>
  66. <td align="center" valign="top">No</td>
  67. </tr>
  68. <tr>
  69. <td valign="top">quiet</td>
  70. <td valign="top">suppress informational messages.</td>
  71. <td align="center" valign="top">No, default &quot;false&quot;</td>
  72. </tr>
  73. <tr>
  74. <td valign="top">noexec</td>
  75. <td valign="top">report only, don't change any files.</td>
  76. <td align="center" valign="top">No, default to &quot;false&quot;</td>
  77. </tr>
  78. <tr>
  79. <td valign="top">output</td>
  80. <td valign="top">the file to direct standard output from the command.</td>
  81. <td align="center" valign="top">No, default output to ANT Log as MSG_INFO.</td>
  82. </tr>
  83. <tr>
  84. <td valign="top">error</td>
  85. <td valign="top">the file to direct standard error from the command.</td>
  86. <td align="center" valign="top">No, default error to ANT Log as MSG_WARN.</td>
  87. </tr>
  88. <tr>
  89. <td valign="top">append</td>
  90. <td valign="top">whether to append output/error when redirecting to a file.</td>
  91. <td align="center" valign="top">No, default to &quot;false&quot;.</td>
  92. </tr>
  93. <tr>
  94. <td valign="top">port</td>
  95. <td valign="top">Port used by CVS to communicate with the server.</td>
  96. <td align="center" valign="top">No, default port 2401.</td>
  97. </tr>
  98. <tr>
  99. <td valign="top">passfile</td>
  100. <td valign="top">Password file to read passwords from.</td>
  101. <td align="center" valign="top">No, default file ~/.cvspass.</td>
  102. </tr>
  103. <tr>
  104. <td valign="top">failonerror</td>
  105. <td valign="top">Stop the build process if the command exits with a
  106. return code other than 0. Defaults to false</td>
  107. <td align="center" valign="top">No</td>
  108. </tr>
  109. </table>
  110. <h3>Examples</h3>
  111. <pre> &lt;cvs cvsRoot=&quot;:pserver:anoncvs@cvs.apache.org:/home/cvspublic&quot;
  112. package=&quot;jakarta-ant&quot;
  113. dest=&quot;${ws.dir}&quot;
  114. /&gt;</pre>
  115. <p>checks out the package/module &quot;jakarta-ant&quot; from the CVS
  116. repository pointed to by the cvsRoot attribute, and stores the files in &quot;${ws.dir}&quot;.</p>
  117. <pre> &lt;cvs dest=&quot;${ws.dir}&quot; command=&quot;update&quot;/&gt;</pre>
  118. <p>updates the package/module that has previously been checked out into
  119. &quot;${ws.dir}&quot;.</p>
  120. <pre> &lt;cvs command=&quot;-q diff -u -N&quot; output=&quot;patch.txt&quot;/&gt;</pre>
  121. <p>silently (-q) creates a file called patch.txt which contains a unified (-u) diff which includes new files added via &quot;cvs add&quot; (-N) and can be used as input to patch.
  122. The equivalent, using &lt;commandline&gt; elements, is:
  123. </p>
  124. <pre>
  125. &lt;cvs output="patch"&gt;
  126. &lt;commandline&gt;
  127. &lt;argument value="-q"/&gt;
  128. &lt;argument value="diff"/&gt;
  129. &lt;argument value="-u"/&gt;
  130. &lt;argument value="-N"/&gt;
  131. &lt;/commandline&gt;
  132. &lt;/cvs&gt;
  133. </pre>
  134. or:
  135. <pre>
  136. &lt;cvs output="patch"&gt;
  137. &lt;commandline&gt;
  138. &lt;argument line="-q diff -u -N"/&gt;
  139. &lt;/commandline&gt;
  140. &lt;/cvs&gt;
  141. </pre>
  142. <p>
  143. You may include as many &lt;commandline&gt; elements as you like.
  144. Each will inherit the <code>failonerror</code>, <code>compression</code>, and other &quot;global&quot; parameters
  145. from the <code>&lt;cvs&gt;</code> element.
  146. </p>
  147. <pre> &lt;cvs command=&quot;update -A -d&quot;/&gt;</pre>
  148. <p>Updates from the head of repository ignoring sticky bits (-A) and creating any new directories as necessary (-d).</p>
  149. <p>Note: the text of the command is passed to cvs &quot;as-is&quot; so any cvs options should appear
  150. before the command, and any command options should appear after the command as in the diff example
  151. above. See <a href="http://www.cvshome.org/docs/manual/index.html" target="_top">the cvs manual</a> for details,
  152. specifically the <a href="http://www.cvshome.org/docs/manual/cvs_16.html" target="_top">Guide to CVS commands</a></p>
  153. <hr>
  154. <p align="center">Copyright &copy; 2000-2002 Apache Software
  155. Foundation. All rights Reserved.</p>
  156. </body>
  157. </html>