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

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