﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-&lt;script language="javascript" src="http://www.shi-ci.com/embeded.do"&gt;&lt;/script&gt;-随笔分类-clearcase</title><link>http://www.blogjava.net/yglwxl/category/35928.html</link><description /><language>zh-cn</language><lastBuildDate>Wed, 12 Nov 2008 08:43:53 GMT</lastBuildDate><pubDate>Wed, 12 Nov 2008 08:43:53 GMT</pubDate><ttl>60</ttl><item><title>ClearCase简单使用 (转)</title><link>http://www.blogjava.net/yglwxl/archive/2008/11/12/240087.html</link><dc:creator>九宝</dc:creator><author>九宝</author><pubDate>Wed, 12 Nov 2008 06:14:00 GMT</pubDate><guid>http://www.blogjava.net/yglwxl/archive/2008/11/12/240087.html</guid><wfw:comment>http://www.blogjava.net/yglwxl/comments/240087.html</wfw:comment><comments>http://www.blogjava.net/yglwxl/archive/2008/11/12/240087.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/yglwxl/comments/commentRss/240087.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yglwxl/services/trackbacks/240087.html</trackback:ping><description><![CDATA[<div id="art" style="margin: 15px">
<div><font color="#0000ff">1. When you come to work, the first thing you need to do is: Create a View</font></div>
<div><font color="#0000ff">&nbsp;&nbsp; Command:</font></div>
<div>&nbsp;</div>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 91.64%; border-bottom: #999 1px solid; height: 24px" align="center">
    <tbody>
        <tr>
            <td>
            <p>ct mkview -tag &lt;view_tag&gt; &lt;view_storage_path&gt;</p>
            </td>
        </tr>
    </tbody>
</table>
<p>&nbsp;&nbsp; example:</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 91.64%; border-bottom: #999 1px solid; height: 24px" align="center">
    <tbody>
        <tr>
            <td>ct mkview -tag alex_test /net/nj2/</td>
        </tr>
    </tbody>
</table>
</p>
<p>&nbsp;&nbsp; Other Command:</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 24px" align="center">
    <tbody>
        <tr>
            <td>ct lsview&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; list all the views reside in the hosts</td>
        </tr>
    </tbody>
</table>
</p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.62%; border-bottom: #999 1px solid; height: 24px" align="center">
    <tbody>
        <tr>
            <td>ct lsview | grep name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; list specified view by name</td>
        </tr>
    </tbody>
</table>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.62%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td>ct rmview -tag &lt;view_tag&gt;&nbsp;&nbsp;remove an exist view</td>
        </tr>
    </tbody>
</table>
</p>
<p><font color="#0000ff">2. After you create a vew, you need to Set the View to enter it. Then you are able to see the vob content only when you set the view.</font></p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td>ct setview &lt;view_tag&gt;</td>
        </tr>
    </tbody>
</table>
</p>
<p>Example:</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td>ct setview alex_test</td>
        </tr>
    </tbody>
</table>
</p>
<p>Other Commands</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td>ct pwv&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; see which view you are currently in</td>
        </tr>
    </tbody>
</table>
</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td>exit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;quit from current view</td>
        </tr>
    </tbody>
</table>
</p>
<p><font color="#0000ff">3. When you are in a view, you need to set the config spec correctly to pick up the right version of element.</font></p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td>ct catcs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; view your config spec</td>
        </tr>
    </tbody>
</table>
</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td>ct edcs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; edit&nbsp;your config spec by vi editor</td>
        </tr>
    </tbody>
</table>
</p>
<p>Other Commands</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td>ct catcs &gt; filename&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Copy your config spec to a file</td>
        </tr>
    </tbody>
</table>
</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td>ct setcs filename&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set your config spec from a file</td>
        </tr>
    </tbody>
</table>
</p>
<p>What doew config spec say ? For example:</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td>
            <p>element* CHECKEDOUT</p>
            <p>element* .../ISGcq00123456/LASTEST</p>
            <p>element* BLUETOOTH_00.07.00</p>
            <p>element* AP_SIPC.01.32.00</p>
            <p>element* AP_IB2.00.38_ARM</p>
            <p>element* /main/LATEST</p>
            </td>
        </tr>
    </tbody>
</table>
</p>
<p>Command</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td>element &lt;file path&gt; &lt;version path&gt;</td>
        </tr>
    </tbody>
</table>
</p>
<p>file path: hello.c, *, /vob/su_java/...</p>
<p>version path: Label or Branch</p>
<p><font color="#0000ff">4. Now you may have a task to do. You have a CR assigned, and you know the baseline version.</font></p>
<ul>
    <li><font size="2">Set config spec to the baseline version.</font>
    <li><font size="2">Create branch type associated with the CR.</font></li>
</ul>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td>ct mkbrtype ISGcq00123456</td>
        </tr>
    </tbody>
</table>
</p>
<ul>
    <li><font size="2">Make branch on the baseline version</font></li>
</ul>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td>ct mkbranch ISGcq00123456 <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#101;&#108;&#108;&#111;&#46;&#99;&#64;&#64;&#47;&#109;&#97;&#105;&#110;&#47;&#50;">hello.c@@/main/2</a></td>
        </tr>
    </tbody>
</table>
</p>
<p>&nbsp;&nbsp; Result: <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#101;&#108;&#108;&#111;&#46;&#99;&#64;&#64;&#47;&#109;&#97;&#105;&#110;&#47;&#73;&#83;&#71;&#99;&#113;&#48;&#48;&#49;&#50;&#51;&#52;&#53;&#54;&#47;&#48;">hello.c@@/main/ISGcq00123456/0</a> is created and checked out(<font color="#a6a6a6">a copy of hello.c in the dir was created and you can edited it. If there is not hello.c in the dir, the clearcase would submit a error</font>).</p>
<ul>
    <li><font size="2">Add a rule to pick up this branch in the config spec, just below the CHECKEDOUT rule.</font></li>
</ul>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td>element* .../ISGcq00123456/LATEST</td>
        </tr>
    </tbody>
</table>
</p>
<p>Accessional:</p>
<ul>
    <li><font size="2">Branch type shall have naming convention designed by every project.</font>
    <li><font size="2">Don't want check out:</font></li>
</ul>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td>ct mkbranch -nco ISGcq00123456 <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#101;&#108;&#108;&#111;&#46;&#99;&#64;&#64;&#47;&#109;&#97;&#105;&#110;&#47;&#50;">hello.c@@/main/2</a></td>
        </tr>
    </tbody>
</table>
</p>
<ul>
    <li><font size="2">Remove a branch from an element:</font></li>
</ul>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td>ct rmbranch <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#101;&#108;&#108;&#111;&#46;&#99;&#64;&#64;&#47;&#109;&#97;&#105;&#110;&#47;&#73;&#83;&#71;&#99;&#113;&#48;&#48;&#49;&#50;&#51;&#52;&#53;&#54;">hello.c@@/main/ISGcq00123456</a>.</td>
        </tr>
    </tbody>
</table>
</p>
<p>&nbsp;&nbsp;&nbsp;Make sure no checked out version on this branch</p>
<ul>
    <li><font size="2">Rename a branch name</font></li>
</ul>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td>ct rename brtype:old_name brtype:new_name</td>
        </tr>
    </tbody>
</table>
</p>
<p>&nbsp;&nbsp; It will apply to all the created branch.</p>
<ul>
    <li><font size="2">Remove a branch type as well as all the related element branch</font></li>
</ul>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td>ct rmtype -rmall brtype:ISGcq00123456</td>
        </tr>
    </tbody>
</table>
</p>
<p><font color="#0000ff">5. After making your CR branch on the file to be changed, check out the version if it hasn't been checked out</font>(<font face="Arial" color="#ff0000">checkout后会产生一个自己的私有文件，你可以自己修改，别人看不到，只有这个文件被checkin后才会放到vobs里</font>).</p>
<span style="font-weight: normal; font-size: 9pt; color: #000000; font-style: normal; font-family: arial"><span style="font-weight: normal; font-size: 9pt; color: #000000; font-style: normal; font-family: arial"><span style="font-weight: normal; font-size: 9pt; color: #000000; font-style: normal; font-family: arial">
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td>
            <pre>ct co -nc <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#101;&#108;&#108;&#111;&#46;&#99;&#64;&#64;&#47;&#109;&#97;&#105;&#110;&#47;&#73;&#83;&#71;&#99;&#113;&#48;&#48;&#49;&#50;&#51;&#52;&#53;&#54;&#47;&#48;">hello.c@@/main/ISGcq00123456/0</a></pre>
            </td>
        </tr>
    </tbody>
</table>
</p>
<pre><font size="2">&nbsp;&nbsp;&nbsp; Then, you are able to edit this file. After you finish the change, check in the file to vob.</font></pre>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td>
            <pre>ct ci -nc hello.c</pre>
            </td>
        </tr>
    </tbody>
</table>
</p>
<pre>&nbsp;&nbsp;&nbsp; The result is, the element will increase one version on the branch:</pre>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td>
            <pre><a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#101;&#108;&#108;&#111;&#46;&#99;&#64;&#64;&#47;&#109;&#97;&#105;&#110;&#47;&#73;&#83;&#71;&#99;&#113;&#48;&#48;&#49;&#50;&#51;&#52;&#53;&#54;&#47;&#49;">hello.c@@/main/ISGcq00123456/1</a></pre>
            </td>
        </tr>
    </tbody>
</table>
</p>
<pre><font size="2">Accessional</font></pre>
<ul>
    <li>
    <pre><font size="2">A checked out version is only in your view. Other engineer can not see it. If you remove that view, you will lost the checked out version.</font></pre>
    <li>
    <pre><font size="2">You can undo checkout by:</font></pre>
    </li>
</ul>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 24px" align="center">
    <tbody>
        <tr>
            <td>
            <pre>ct unco hello.c</pre>
            </td>
        </tr>
    </tbody>
</table>
</p>
<ul>
    <li>
    <pre><font size="2">If a checked version has no change, it can't be checked in. You will get an error message like "The file is identical"</font></pre>
    <li>
    <pre><font size="2">An unreserved checked out will not block other people check out the same version. Normally, we just use reserved checkout.</font></pre>
    <li>
    <pre><font size="2">You can only check out a file on the branch which has mastership role.</font></pre>
    </li>
</ul>
<pre><font color="#0000ff" size="2">6. If your task is to create a new file, you need to do below steps:</font></pre>
<ul>
    <li><font face="Verdana" size="2">Make branch on the directory that you will add the file to</font></li>
</ul>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct mkbranch ISGcq00123456 /vob/su_jave/code/src</font></td>
        </tr>
    </tbody>
</table>
</p>
<ul>
    <li><font face="Verdana">The directory will be automatically checked out. Then make element in this dir.</font></li>
</ul>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct mkelem -nco hello.c</font></td>
        </tr>
    </tbody>
</table>
</p>
<p><font face="Verdana">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a folder</font></p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct mkelem -eltype directory test</font></td>
        </tr>
    </tbody>
</table>
</p>
<p><font face="Verdana">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dont check it out, because you need to make the CR branch on this file.</font></p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct mkbranch ISGcq00123456 hello.c</font></td>
        </tr>
    </tbody>
</table>
</p>
<ul>
    <li><font size="2"><font face="Verdana">Check in this directory. Otherwise, other people can not see your new file.</font></font></li>
</ul>
<font size="2"><font face="Verdana">
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct ci -nc /vob/su_java/code/src</font></td>
        </tr>
    </tbody>
</table>
</p>
<p>Accessional</p>
<ul>
    <li>We usually only check in the file, but forget to check in the directory. This will cause the file you created can't be stored in the VOB and can't be seen by other people.
    <li>Go to the top project folder, use below command to list all checked out files and directories int the current dir and sub dir in your view. It will help you check in all elements.</li>
</ul>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct lsco -cview -r</font></td>
        </tr>
    </tbody>
</table>
</p>
<p><font color="#0000ff">7. Now, your task is ongoing. In coding and testing, you may need to merge your file to other version. below example gives the merge steps:</font></p>
<p>Example: Merge file from <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#101;&#108;&#108;&#111;&#46;&#99;&#64;&#64;&#47;&#109;&#97;&#105;&#110;&#47;&#98;&#114;&#97;&#110;&#99;&#104;&#102;&#114;&#111;&#109;&#47;&#53;">hello.c@@/main/branchfrom/5</a> to <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#101;&#108;&#108;&#111;&#46;&#99;&#64;&#64;&#47;&#109;&#97;&#105;&#110;&#47;&#98;&#114;&#97;&#110;&#99;&#104;&#116;&#111;&#47;&#50;">hello.c@@/main/branchto/2</a></p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct co -nc <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#101;&#108;&#108;&#111;&#46;&#99;&#64;&#64;&#47;&#109;&#97;&#105;&#110;&#47;&#98;&#114;&#97;&#110;&#99;&#104;&#116;&#111;&#47;&#50;">hello.c@@/main/branchto/2</a></font></td>
        </tr>
    </tbody>
</table>
</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct merge -to hello.c <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#101;&#108;&#108;&#111;&#46;&#99;&#64;&#64;&#47;&#109;&#97;&#105;&#110;&#47;&#98;&#114;&#97;&#110;&#99;&#104;&#102;&#114;&#111;&#109;&#47;&#53;">hello.c@@/main/branchfrom/5</a></font></td>
        </tr>
    </tbody>
</table>
</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; Usually you may also need to compare two versions</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct diff hello.c hello.c <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#101;&#108;&#108;&#111;&#46;&#99;&#64;&#64;&#47;&#109;&#97;&#105;&#110;&#47;&#98;&#114;&#97;&#110;&#99;&#104;&#102;&#114;&#111;&#109;&#47;&#53;">hello.c@@/main/branchfrom/5</a>&nbsp;<a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#101;&#108;&#108;&#111;&#46;&#99;&#64;&#64;&#47;&#109;&#97;&#105;&#110;&#47;&#98;&#114;&#97;&#110;&#99;&#104;&#116;&#111;&#47;&#50;">hello.c@@/main/branchto/2</a></font></td>
        </tr>
    </tbody>
</table>
</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; Compare this version from the previous version</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct&nbsp;diff -pre h<a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#101;&#108;&#108;&#111;&#46;&#99;&#64;&#64;&#47;&#109;&#97;&#105;&#110;&#47;&#98;&#114;&#97;&#110;&#99;&#104;&#116;&#111;&#47;&#50;">ello.c@@/main/branchto/2</a></font></td>
        </tr>
    </tbody>
</table>
</p>
<p>Accessional</p>
<ul>
    <li>Use this command to list all versions of an element</li>
</ul>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct lsvt hello.c</font></td>
        </tr>
    </tbody>
</table>
</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; include the merge info</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct lsvt -merge hello.c</font></td>
        </tr>
    </tbody>
</table>
</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; Remove a merge arrow:</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct rmmerge <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#101;&#108;&#108;&#111;&#46;&#99;&#64;&#64;&#47;&#109;&#97;&#105;&#110;&#47;&#98;&#114;&#97;&#110;&#99;&#104;&#102;&#114;&#111;&#109;&#47;&#53;">hello.c@@/main/branchfrom/5</a>&nbsp;<a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#101;&#108;&#108;&#111;&#46;&#99;&#64;&#64;&#47;&#109;&#97;&#105;&#110;&#47;&#98;&#114;&#97;&#110;&#99;&#104;&#116;&#111;&#47;&#50;">hello.c@@/main/branchto/2</a></font></td>
        </tr>
    </tbody>
</table>
</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; Dont do actual merge, just draw a merge line</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct&nbsp;merge -ndata&nbsp;<a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#101;&#108;&#108;&#111;&#46;&#99;&#64;&#64;&#47;&#109;&#97;&#105;&#110;&#47;&#98;&#114;&#97;&#110;&#99;&#104;&#102;&#114;&#111;&#109;&#47;&#53;">hello.c@@/main/branchfrom/5</a>&nbsp;<a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#101;&#108;&#108;&#111;&#46;&#99;&#64;&#64;&#47;&#109;&#97;&#105;&#110;&#47;&#98;&#114;&#97;&#110;&#99;&#104;&#116;&#111;&#47;&#50;">hello.c@@/main/branchto/2</a></font></td>
        </tr>
    </tbody>
</table>
</p>
<p>In what cases we need merge:</p>
<ul>
    <li>Integrate with the code developed by someone else.
    <li>If baseline version has been incresed, need upermage.
    <li>Merge for release.</li>
</ul>
<p><font color="#0000ff">8. If you want to remove an un-use version, use the command</font></p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct&nbsp;rmver <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#101;&#108;&#108;&#111;&#46;&#99;&#64;&#64;&#47;&#109;&#97;&#105;&#110;&#47;&#98;&#114;&#97;&#110;&#99;&#104;&#116;&#111;&#47;&#50;">hello.c@@/main/branchto/2</a></font></td>
        </tr>
    </tbody>
</table>
</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; Then the version 2 will be removed, but next time the version will increase from 1 to 3.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; If you want to remove a file, you can use remove name command:</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct rmname hello.c</font></td>
        </tr>
    </tbody>
</table>
</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; Be sure to make branch and check out the current directory before rmove it, just like the steps of make element.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; If you want to rename a file, you can use</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct mv old_name new_name</font></td>
        </tr>
    </tbody>
</table>
</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; If you want to create an element link, you can use</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct ln source_file file_link</font></td>
        </tr>
    </tbody>
</table>
</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; (checkout current folder like above)</p>
<p><font color="#0000ff">9. Now you may have completed the task of coding, testing, inspection, and prepare to release it. You need to check your developed version is complied with below rules:</font></p>
<ul>
    <li>Must make branch from the baseline version.
    <li>Must have up merged your branch if the baseline version is not the LATEST version.
    <li>All the files and directories have no checkou.</li>
</ul>
<p><font color="#0000ff">10. How to label the version</font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; Make the label type:</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct mklbtype BLUETOOTH_00.07.00</font></td>
        </tr>
    </tbody>
</table>
</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; Make label on a version:</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct mklabel BLUETOOTH_00.07.00 <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#101;&#108;&#108;&#111;&#46;&#99;&#64;&#64;&#47;&#109;&#97;&#105;&#110;&#47;&#98;&#114;&#97;&#110;&#99;&#104;&#116;&#111;&#47;&#50;">hello.c@@/main/branchto/2</a></font></td>
        </tr>
    </tbody>
</table>
</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; Move a label from the old version to a new version:</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct mklabel -replace BLUETOOTH_00.07.00 <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#101;&#108;&#108;&#111;&#46;&#99;&#64;&#64;&#47;&#109;&#97;&#105;&#110;&#47;&#98;&#114;&#97;&#110;&#99;&#104;&#116;&#111;&#47;&#51;">hello.c@@/main/branchto/3</a></font></td>
        </tr>
    </tbody>
</table>
</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; Remove label on a version:</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct&nbsp;rmlabel BLUETOOTH_00.07.00 <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#101;&#108;&#108;&#111;&#46;&#99;&#64;&#64;&#47;&#109;&#97;&#105;&#110;&#47;&#98;&#114;&#97;&#110;&#99;&#104;&#116;&#111;&#47;&#51;">hello.c@@/main/branchto/3</a></font></td>
        </tr>
    </tbody>
</table>
</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; Remove the label type</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct rmtype lbtype:BLUETOOTH_00.07.00</font></td>
        </tr>
    </tbody>
</table>
</p>
<p><font color="#0000ff">11. How to search the reuqired version</font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; Find all files with the version(.../ISGcq00373766/LATEST) and with no label SAMBA_AP_DSL_BLUETOOTH_00.00.07:</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct find /vob/directory -version 'version(.../ISGcq00373766/LATEST)&nbsp; &amp;&amp; !version(SAMBA_AP_DSL_BLUETOOTH_00.00.07)' -print</font></td>
        </tr>
    </tbody>
</table>
</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; Find all files with the version SAMBA_AP_DSL_BLUETOOTH_00.00.07, and then search STRING in all found files:</p>
<p>
<table style="border-right: #999 1px solid; border-top: #999 1px solid; font-size: 12px; border-left: #999 1px solid; width: 90.96%; border-bottom: #999 1px solid; height: 23px" align="center">
    <tbody>
        <tr>
            <td><font face="Verdana">ct find .-version 'version(SAMBA_AP_DSL_BLUETOOTH_00.00.07)'&nbsp;-exec 'grep STRING $CLEARCASE_PN'</font></td>
        </tr>
    </tbody>
</table>
</p>
</font></span></span></span></font></div>
 <img src ="http://www.blogjava.net/yglwxl/aggbug/240087.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yglwxl/" target="_blank">九宝</a> 2008-11-12 14:14 <a href="http://www.blogjava.net/yglwxl/archive/2008/11/12/240087.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>