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.

clearcase.html 17 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Clearcase Tasks</title>
  5. </head>
  6. <body>
  7. <h1>Ant ClearCase Tasks</h1>
  8. <p>by:<br>
  9. Curtis White (cwhite at aracnet dot com),<br>
  10. Sean P. Kane (spkane at genomatica dot com), and<br>
  11. Rob Anderson (Anderson.Rob at vectorscm dot com)</p>
  12. <p>Version 1.6 - 02/25/2003</p>
  13. <h1>ClearCase Support</h1>
  14. <h2>Table of Contents</h2>
  15. <ul>
  16. <li><A href="#introduction">Introduction</a>
  17. <li><A href="#cccheckin">CCCheckin</a>
  18. <li><A href="#cccheckout">CCCheckout</a>
  19. <li><A href="#ccuncheckout">CCUnCheckout</a>
  20. <li><A href="#ccupdate">CCUpdate</a>
  21. <li><A href="#ccmklbtype">CCMklbtype</a>
  22. <li><A href="#ccmklabel">CCMklabel</a>
  23. <li><A href="#ccrmtype">CCRmtype</a>
  24. <li><A href="#cclock">CCLock</a>
  25. <li><A href="#ccunlock">CCUnlock</a>
  26. <li><A href="#ccmkbl">CCMkbl</a></li>
  27. </ul>
  28. <hr>
  29. <h2><a name="introduction">Introduction</a></h2>
  30. <p>Ant provides several optional tasks for working with ClearCase. These tasks correspond to various
  31. ClearCase commands using the Cleartool program. The current tasks avaliable for Ant correspond to only
  32. a few of the significant ClearCase commands.</p>
  33. <p>More tasks can be easily added by deriving from the ClearCase class and then adding
  34. functionality that is specific to that ClearCase command.</p>
  35. <hr>
  36. <h2><a name="cccheckin">CCCheckin</a></h2>
  37. <h3>Description</h3>
  38. Task to perform a "cleartool checkin" command to ClearCase.
  39. <h3>Parameters</h3>
  40. <table border="1" cellpadding="2" cellspacing="0">
  41. <tr>
  42. <th>Attribute</th>
  43. <th>Values</th>
  44. <th>Required</th>
  45. </tr>
  46. <tr>
  47. <td>viewpath</td>
  48. <td>Path to the ClearCase view file or directory that the command
  49. will operate on</td>
  50. <td>No</td>
  51. </tr>
  52. <tr>
  53. <td>comment</td>
  54. <td>Specify a comment. Only one of comment or commentfile may be used.</td>
  55. <td>No</td>
  56. </tr>
  57. <tr>
  58. <td>commentfile</td>
  59. <td>Specify a file containing a comment. Only one of comment or commentfile
  60. may be used.</td>
  61. <td>No</td>
  62. </tr>
  63. <tr>
  64. <td>nowarn</td>
  65. <td>Suppress warning messages</td>
  66. <td>No</td>
  67. </tr>
  68. <tr>
  69. <td>preservetime</td>
  70. <td>Preserve the modification time</td>
  71. <td>No</td>
  72. </tr>
  73. <tr>
  74. <td>keepcopy</td>
  75. <td>Keeps a copy of the file with a .keep extension</td>
  76. <td>No</td>
  77. </tr>
  78. <tr>
  79. <td>identical</td>
  80. <td>Allows the file to be checked in even if it is identical
  81. to the original</td>
  82. <td>No</td>
  83. </tr>
  84. </table>
  85. <h3>Examples</h3>
  86. <blockquote>
  87. <pre>
  88. &lt;cccheckin viewpath="c:/views/viewdir/afile"
  89. commentfile="acomment.txt"
  90. nowarn="true"
  91. identical="true"/&gt;
  92. </pre>
  93. </blockquote>
  94. <p>Does a ClearCase <i>checkin</i> on the file <i>c:/views/viewdir/afile</i>.
  95. Comment text from the file <i>acomment.txt</i> is added to ClearCase as a comment.
  96. All warning messages are suppressed. The file is checked in even if it is
  97. <i>identical</i> to the original.</p>
  98. <hr>
  99. <h2><a name="cccheckout">CCCheckout</a></h2>
  100. <h3>Description</h3>
  101. Task to perform a "cleartool checkout" command to ClearCase.
  102. <h3>Parameters</h3>
  103. <table border="1" cellpadding="2" cellspacing="0">
  104. <tr>
  105. <th>Attribute</th>
  106. <th>Values</th>
  107. <th>Required</th>
  108. </tr>
  109. <tr>
  110. <td>viewpath</td>
  111. <td>Path to the ClearCase view file or directory that the command
  112. will operate on</td>
  113. <td>No</td>
  114. </tr>
  115. <tr>
  116. <td>reserved</td>
  117. <td>Specifies whether to check out the file as reserved or not</td>
  118. <td>Yes</td>
  119. </tr>
  120. <tr>
  121. <td>out</td>
  122. <td>Creates a writable file under a different filename</td>
  123. <td>No</td>
  124. </tr>
  125. <tr>
  126. <td>nodata</td>
  127. <td>Checks out the file but does not create an editable file
  128. containing its data</td>
  129. <td>No</td>
  130. </tr>
  131. <tr>
  132. <td>branch</td>
  133. <td>Specify a branch to check out the file to</td>
  134. <td>No</td>
  135. </tr>
  136. <tr>
  137. <td>version</td>
  138. <td>Allows checkout of a version other than main latest</td>
  139. <td>No</td>
  140. </tr>
  141. <tr>
  142. <td>nowarn</td>
  143. <td>Suppress warning messages</td>
  144. <td>No</td>
  145. </tr>
  146. <tr>
  147. <td>comment</td>
  148. <td>Specify a comment. Only one of comment or commentfile may be used.</td>
  149. <td>No</td>
  150. </tr>
  151. <tr>
  152. <td>commentfile</td>
  153. <td>Specify a file containing a comment. Only one of comment or
  154. commentfile may be used.</td>
  155. <td>No</td>
  156. </tr>
  157. </table>
  158. <h3>Examples</h3>
  159. <blockquote>
  160. <pre>
  161. &lt;cccheckout viewpath="c:/views/viewdir/afile"
  162. reserved="true"
  163. branch="abranch"
  164. nowarn="true"
  165. comment="Some comment text"/&gt;
  166. </pre>
  167. </blockquote>
  168. <p>Does a ClearCase <i>checkout</i> on the file <i>c:/views/viewdir/afile</i>.
  169. It is checked out as <i>reserved</i> on branch called <i>abranch</i>. All
  170. warning messages are suppressed. A <i>Some comment text</i> is added to
  171. ClearCase as a comment.</p>
  172. <hr>
  173. <h2><a name="ccuncheckout">CCUnCheckout</a></h2>
  174. <h3>Description</h3>
  175. Task to perform a UnCheckout command to ClearCase.
  176. <h3>Parameters</h3>
  177. <table border="1" cellpadding="2" cellspacing="0">
  178. <tr>
  179. <th>Attribute</th>
  180. <th>Values</th>
  181. <th>Required</th>
  182. </tr>
  183. <tr>
  184. <td>viewpath</td>
  185. <td>Path to the ClearCase view file or directory that the command
  186. will operate on</td>
  187. <td>No</td>
  188. </tr>
  189. <tr>
  190. <td>keepcopy</td>
  191. <td>Specifies whether to keep a copy of the file with a .keep
  192. extension or not</td>
  193. <td>No</td>
  194. </tr>
  195. </table>
  196. <h3>Examples</h3>
  197. <blockquote>
  198. <pre>
  199. &lt;ccuncheckout viewpath="c:/views/viewdir/afile"
  200. keepcopy="true"/&gt;
  201. </pre>
  202. </blockquote>
  203. <p>Does a ClearCase <i>uncheckout</i> on the file <i>c:/views/viewdir/afile</i>.
  204. A copy of the file called <i>c:/views/viewdir/afile.keep</i> is kept.</p>
  205. <hr>
  206. <h2><a name="ccupdate">CCUpdate</a></h2>
  207. <h3>Description</h3>
  208. Task to perform an "cleartool update" command to ClearCase.
  209. <h3>Parameters</h3>
  210. <table border="1" cellpadding="2" cellspacing="0">
  211. <tr>
  212. <th>Attribute</th>
  213. <th>Values</th>
  214. <th>Required</th>
  215. </tr>
  216. <tr>
  217. <td>viewpath</td>
  218. <td>Path to the ClearCase snapshot view file or directory that the command
  219. will operate on</td>
  220. <td>No</td>
  221. </tr>
  222. <tr>
  223. <td>graphical</td>
  224. <td>Displays a graphical dialog during the update</td>
  225. <td>No</td>
  226. </tr>
  227. <tr>
  228. <td>log</td>
  229. <td>Specifies a log file for ClearCase to write to</td>
  230. <td>No</td>
  231. </tr>
  232. <tr>
  233. <td>overwrite</td>
  234. <td>Specifies whether to overwrite hijacked files or not</td>
  235. <td>No</td>
  236. </tr>
  237. <tr>
  238. <td>rename</td>
  239. <td>Specifies that hijacked files should be renamed with a .keep extension</td>
  240. <td>No</td>
  241. </tr>
  242. <tr>
  243. <td>currenttime</td>
  244. <td>Specifies that modification time should be written as the
  245. current time. Either currenttime or preservetime can be
  246. specified.</td>
  247. <td>No</td>
  248. </tr>
  249. <tr>
  250. <td>preservetime</td>
  251. <td>Specifies that modification time should preserved from the
  252. VOB time. Either currenttime or preservetime can be
  253. specified.</td>
  254. <td>No</td>
  255. </tr>
  256. </table>
  257. <h3>Examples</h3>
  258. <blockquote>
  259. <pre>
  260. &lt;ccupdate viewpath="c:/views/viewdir"
  261. graphical="false"
  262. log="log.log"
  263. overwrite="true"
  264. currenttime="true"
  265. rename="false"/&gt;
  266. </pre>
  267. </blockquote>
  268. <p>Does a ClearCase <i>update</i> on the snapshot view directory <i>c:/views/viewdir</i>.
  269. A graphical dialog will be displayed. The output will be logged to
  270. <i>log.log</i> and it will overwrite any hijacked files. The modified
  271. time will be set to the current time.</p>
  272. <hr>
  273. <h2><a name="ccmklbtype">CCMklbtype</a></h2>
  274. <h3>Description</h3>
  275. Task to perform a "mklbtype" command to ClearCase.
  276. <h3>Parameters</h3>
  277. <table border="1" cellpadding="2" cellspacing="0">
  278. <tr>
  279. <th>Attribute</th>
  280. <th>Values</th>
  281. <th>Required</th>
  282. </tr>
  283. <tr>
  284. <td>typename</td>
  285. <td>Name of the label type to create</td>
  286. <td>Yes</td>
  287. <tr>
  288. <tr>
  289. <td>vob</td>
  290. <td>Name of the VOB</td>
  291. <td>No</td>
  292. <tr>
  293. <tr>
  294. <td>replace</td>
  295. <td>Replace an existing label definition of the same type</td>
  296. <td>No</td>
  297. <tr>
  298. <tr>
  299. <td>global</td>
  300. <td>Either global or ordinary can be specified, not both. Creates a label type that is global to the VOB or to VOBs that use this VOB</td>
  301. <td>No</td>
  302. <tr>
  303. <tr>
  304. <td>ordinary</td>
  305. <td>Either global or ordinary can be specified, not both. Creates a label type that can be used only in the current VOB. <B>Default</B></td>
  306. <td>No</td>
  307. <tr>
  308. <tr>
  309. <td>pbranch</td>
  310. <td>Allows the label type to be used once per branch in a given element's version tree</td>
  311. <td>No</td>
  312. <tr>
  313. <tr>
  314. <td>shared</td>
  315. <td>Sets the way mastership is checked by ClearCase. See ClearCase documentation for details</td>
  316. <td>No</td>
  317. <tr>
  318. <tr>
  319. <td>comment</td>
  320. <td>Specify a comment. Only one of comment or cfile may be used.</td>
  321. <td>No</td>
  322. <tr>
  323. <tr>
  324. <td>commentfile</td>
  325. <td>Specify a file containing a comment. Only one of comment or cfile may be used.</td>
  326. <td>No</td>
  327. <tr></tr>
  328. </table>
  329. <h3>Examples</h3>
  330. <blockquote>
  331. <pre>
  332. &lt;ccmklbtype typename="VERSION_1"
  333. ordinary="true"
  334. comment="Development version 1"/&gt;
  335. </pre>
  336. </blockquote>
  337. <p>Does a ClearCase <i>mklbtype</i> to create a label type named <i>VERSION_1</i>.
  338. It is created as <i>ordinary</i> so it is available only to the current VOB.
  339. The text <i>Development version 1</i> is added as a comment.</p>
  340. <hr>
  341. <h2><a name="ccmklabel">CCMklabel</a></h2>
  342. <h3>Description</h3>
  343. Task to perform a "mklabel" command to ClearCase.
  344. <h3>Parameters</h3>
  345. <table border="1" cellpadding="2" cellspacing="0">
  346. <tr>
  347. <th>Attribute</th>
  348. <th>Values</th>
  349. <th>Required</th>
  350. </tr>
  351. <tr>
  352. <td>typename</td>
  353. <td>Name of the label type</td>
  354. <td>Yes</td>
  355. <tr>
  356. <tr>
  357. <td>viewpath</td>
  358. <td>Path to the ClearCase view file or directory that the command will operate on</td>
  359. <td>No</td>
  360. <tr>
  361. <tr>
  362. <td>replace</td>
  363. <td>Replace a label of the same type on the same branch</td>
  364. <td>No</td>
  365. <tr>
  366. <tr>
  367. <td>recurse</td>
  368. <td>Process each subdirectory under viewpath</td>
  369. <td>No</td>
  370. <tr>
  371. <tr>
  372. <td>version</td>
  373. <td>Identify a specific version to attach the label to</td>
  374. <td>No</td>
  375. <tr>
  376. <tr>
  377. <td>vob</td>
  378. <td>Name of the VOB</td>
  379. <td>No</td>
  380. <tr>
  381. <tr>
  382. <td>comment</td>
  383. <td>Specify a comment. Only one of comment or cfile may be used.</td>
  384. <td>No</td>
  385. <tr>
  386. <tr>
  387. <td>commentfile</td>
  388. <td>Specify a file containing a comment. Only one of comment or cfile may be used.</td>
  389. <td>No</td>
  390. <tr></tr>
  391. </table>
  392. <h3>Examples</h3>
  393. <blockquote>
  394. <pre>
  395. &lt;ccmklabel viewpath="c:/views/viewdir/afile"
  396. comment="Some comment text"
  397. recurse="true"
  398. version="\main\2"
  399. typename="VERSION_1"/&gt;
  400. </pre>
  401. </blockquote>
  402. <p>Does a ClearCase <i>mklabel</i> on the file <i>c:/views/viewdir/afile</i> under
  403. the main branch for version 2 (<i>\main\2</i>). Text <i>Some comment text</i> is added
  404. as a comment. It will <i>recurse</i> all subdirectories.
  405. <hr>
  406. <h2><a name="ccrmtype">CCRmtype</a></h2>
  407. <h3>Description</h3>
  408. Task to perform a "rmtype" command to ClearCase.
  409. <h3>Parameters</h3>
  410. <table border="1" cellpadding="2" cellspacing="0">
  411. <tr>
  412. <th>Attribute</th>
  413. <th>Values</th>
  414. <th>Required</th>
  415. </tr>
  416. <tr>
  417. <td>typekind</td>
  418. <td>The kind of type to create. Valid types are:
  419. <table border="0" width="40%">
  420. <tr>
  421. <td width="15%"> </td>
  422. <td><b>attype</b><br>
  423. <b>brtype</b><br>
  424. <b>eltype</b><br>
  425. <b>hltype</b><br>
  426. <b>lbtype</b><br>
  427. <b>trtype</b>
  428. </td>
  429. <td>- <br>
  430. - <br>
  431. - <br>
  432. - <br>
  433. - <br>
  434. -
  435. </td>
  436. <td>attribute type<br>
  437. branch type<br>
  438. element type<br>
  439. hyperlink type<br>
  440. label type<br>
  441. trigger type
  442. </td>
  443. </tr>
  444. </table>
  445. </td>
  446. <td>Yes</td>
  447. <tr>
  448. <tr>
  449. <td>typename</td>
  450. <td>The name of the type to remove</td>
  451. <td>Yes</td>
  452. <tr>
  453. <tr>
  454. <td>ignore</td>
  455. <td>Used with trigger types only. Forces removal of trigger type even if a pre-operation trigger would prevent its removal</td>
  456. <td>No</td>
  457. <tr>
  458. <tr>
  459. <td>rmall</td>
  460. <td>Removes all instances of a type and the type object itself</td>
  461. <td>No</td>
  462. <tr>
  463. <tr>
  464. <td>comment</td>
  465. <td>Specify a comment. Only one of comment or cfile may be used.</td>
  466. <td>No</td>
  467. <tr>
  468. <tr>
  469. <td>commentfile</td>
  470. <td>Specify a file containing a comment. Only one of comment or cfile may be used.</td>
  471. <td>No</td>
  472. <tr></tr>
  473. </table>
  474. <h3>Examples</h3>
  475. <blockquote>
  476. <pre>
  477. &lt;ccrmtype typekind="lbtype"
  478. typename="VERSION_1"
  479. commentfile="acomment.txt"
  480. rmall="true"/&gt;
  481. </pre>
  482. </blockquote>
  483. <p>Does a ClearCase <i>rmtype</i> to remove a label type (<i>lbtype</i>) named <i>VERSION_1</i>.
  484. Comment text from the file <i>acomment.txt</i> is added as a comment. All instances of the type
  485. are removed, including the type object itself.</p>
  486. <hr>
  487. <h2><a name="cclock">CCLock</a></h2>
  488. <h3>Description</h3>
  489. Task to perform a "cleartool lock" command to ClearCase.
  490. <h3>Parameters</h3>
  491. <table border="1" cellpadding="2" cellspacing="0">
  492. <tr>
  493. <th>Attribute</th>
  494. <th>Values</th>
  495. <th>Required</th>
  496. </tr>
  497. <tr>
  498. <td>replace</td>
  499. <td>Specifies replacing an existing lock</td>
  500. <td>No</td>
  501. <tr>
  502. <tr>
  503. <td>nusers</td>
  504. <td>Specifies user(s) who can still modify the object</td>
  505. <td>No</td>
  506. <tr>
  507. <tr>
  508. <td>obsolete</td>
  509. <td>Specifies that the object should be marked obsolete</td>
  510. <td>No</td>
  511. <tr>
  512. <tr>
  513. <td>comment</td>
  514. <td>Specifies how to populate comments fields</td>
  515. <td>No</td>
  516. <tr>
  517. <tr>
  518. <td>pname</td>
  519. <td>Specifies the object pathname to be locked.</td>
  520. <td>Yes</td>
  521. <tr>
  522. <td>objselect</td>
  523. <td>Specifies the object(s) to be locked.</td>
  524. <td>Yes</td>
  525. <tr>
  526. </table>
  527. <h3>Examples</h3>
  528. <blockquote>
  529. <pre>
  530. &lt;cclock
  531. objselect="stream:Application_Integration@\MyProject_PVOB"
  532. /&gt;
  533. </pre>
  534. </blockquote>
  535. <p>Does a ClearCase <i>lock</i> on the object <i>stream:Application_Integration@\MyProject_PVOB</i>.</p>
  536. <hr>
  537. <h2><a name="ccunlock">CCUnlock</a></h2>
  538. <h3>Description</h3>
  539. Task to perform a "cleartool unlock" command to ClearCase.
  540. <h3>Parameters</h3>
  541. <table border="1" cellpadding="2" cellspacing="0">
  542. <tr>
  543. <th>Attribute</th>
  544. <th>Values</th>
  545. <th>Required</th>
  546. </tr>
  547. <tr>
  548. <td>comment</td>
  549. <td>Specifies how to populate comments fields</td>
  550. <td>No</td>
  551. <tr>
  552. <tr>
  553. <td>pname</td>
  554. <td>Specifies the object pathname to be unlocked.</td>
  555. <td>Yes</td>
  556. <tr>
  557. <td>objselect</td>
  558. <td>Specifies the object(s) to be unlocked.</td>
  559. <td>Yes</td>
  560. <tr>
  561. </table>
  562. <h3>Examples</h3>
  563. <blockquote>
  564. <pre>
  565. &lt;ccunlock
  566. objselect="stream:Application_Integration@\MyProject_PVOB"
  567. /&gt;
  568. </pre>
  569. </blockquote>
  570. <p>Does a ClearCase <i>unlock</i> on the object <i>stream:Application_Integration@\MyProject_PVOB</i>.</p>
  571. <hr>
  572. <h2><a name="ccmkbl">CCMkbl</a></h2>
  573. <h3>Description</h3>
  574. Task to perform a "cleartool mkbl" command to ClearCase.
  575. <h3>Parameters</h3>
  576. <table border="1" cellpadding="2" cellspacing="0">
  577. <tr>
  578. <th>Attribute</th>
  579. <th>Values</th>
  580. <th>Required</th>
  581. </tr>
  582. <tr>
  583. <td>comment</td>
  584. <td>Specify a comment. Only one of comment or cfile may be
  585. used.</td>
  586. <td>No</td>
  587. </tr>
  588. <tr>
  589. <td>commentfile</td>
  590. <td>Specify a file containing a comment. Only one of comment or
  591. cfile may be used.</td>
  592. <td>No</td>
  593. </tr>
  594. <tr>
  595. <td>baselinerootname</td>
  596. <td>Specify the name to be associated with the baseline.</td>
  597. <td>Yes</td>
  598. </tr>
  599. <tr>
  600. <td>nowarn</td>
  601. <td>Suppress warning messages</td>
  602. <td>No</td>
  603. <tr>
  604. <tr>
  605. <td>identical</td>
  606. <td>Allows the baseline to be created even if it is identical to the
  607. previous baseline.</td>
  608. <td>No</td>
  609. </tr>
  610. <tr>
  611. <td>full</td>
  612. <td>Creates a full baseline.</td>
  613. <td>No</td>
  614. </tr>
  615. <tr>
  616. <td>nlabel</td>
  617. <td>Allows the baseline to be created without a label.</td>
  618. <td>No</td>
  619. </tr>
  620. </table>
  621. <h3>Examples</h3>
  622. <blockquote>
  623. <pre>
  624. &lt;ccmkbl
  625. baselinerootname="Application_Baseline_AUTO"
  626. identical="yes"
  627. full="no"
  628. viewpath="v:\ApplicationCC"
  629. /&gt;
  630. </pre>
  631. </blockquote>
  632. <p>Does a ClearCase <i>mkbl</i> on the Integration view at <i>v:\ApplicationCC</i>
  633. even if it is <i>identical</i> to a previous baseline. The new baseline with be
  634. incremental and named "Application_Baseline_AUTO".</p>
  635. <hr>
  636. <p align="center">Copyright � 2000-2003 Apache Software Foundation. All rights
  637. reserved.</p>
  638. </body>
  639. </html>