Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It seems someone already thought about it on snip2code!<br> Here a tcsh bash script that does exactly what you want.</p> <p><a href="http://www.snip2code.com/Snippet/11216/Custom-diff-tool-for-clearcase-object?fromPage=1" rel="noreferrer">Custom-diff-tool-for-clearcase-object</a></p> <p>As you can see the following is the key code to get the previous version of a given file:</p> <p><code>cleartool descr -pred -short $1</code></p> <p>Where <code>$1</code> is the file name to compare.</p> <hr> <pre><code>#!/bin/tcsh -e set _CLEARCASE_VIEW = `cleartool pwv -short -setview` echo Set view: "$_CLEARCASE_VIEW" set my_firstversion = "" set my_secondversion = "" set my_difftool = kdiff3 # check clearcase view if ( "$_CLEARCASE_VIEW" == "** NONE **" ) then echo "Error: ClearCase view not set, aborted." exit -1 endif if ( "$1" == "" ) then echo "Error: missing 1st file argument!" echo "Eg: `basename $0` file1.txt -&gt; This will diff file1.txt with its previous version" echo "Eg: `basename $0` file1.txt file2.txt -&gt; This will diff file1.txt and file2.txt" exit -1 endif set my_firstversion = "$1" echo "my_firstversion=$my_firstversion" if ( "$2" == "" ) then echo "No 2nd file passed, calculating previous version of $my_firstversion" set my_secondversion = $my_firstversion@@`cleartool descr -pred -short $my_firstversion` else echo "Setting 2nd file to $2" set my_secondversion = "$2" endif echo "my_secondversion=$my_secondversion" ${my_difftool} ${my_firstversion} ${my_secondversion} &amp; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload