Integrating ClearCase with Araxis Merge

I have been using Araxis Merge for a long time. And ever since I used ClearCase in my day job, I got really bad mood. The original merge tool used by ClearCase was really hard to use and confusing. I really couldn’t get any clue when I was faced with its ugly interface even after several months. So I tried to search to find if there’s any solution for replacing it with other tools. Fortunately, they already had one on their web site, but that’s for diff function only.

So here it is, I have modified the sample Perl script to include the merge function as well. Follow the steps and you’ll be happy thereafter:

Create a Perl script like the following and replace the last line with your own path to Araxis Merge tool:

   $base = "";
    $out = "";
    $titleN = 0;
    for ($i = 0; $i <= $#ARGV; $i++) {
        if ($ARGV[$i] eq "-base") {
            ## it is a base file, replace parameters
            $ARGV[$i] = "";
            ## process next param:
            ## replace it by /wait /3 /merge /a1
            $i++;
            ## retrieve the base file
            $base = $ARGV[$i];
            $ARGV[$i] = "/wait /3 /merge /a1 $base";
        }
        
        if ($ARGV[$i] eq "-out") {
            ## it is a title, delete the parameter
            $ARGV[$i] = "";
            $i++;
            ## retrieve the output file
            $out = $ARGV[$i];
            $ARGV[$i] = "";
        }
         
        if ($ARGV[$i] eq "-fname") {
            # it is a title, delete the parameter
            $ARGV[$i] = "";
            $titleN += 1;
            ## process next param:
            ## replace it by /titleN:"$argv[$i]"
            $i++;
            $ARGV[$i] = "/title$titleN:\"$ARGV[$i]\"";
        }
    }
    system "c:/dev/tool/araxis/merge/compare.exe @ARGV $out";

Get Perl2Exe to convert this Perl script to an executable. You must have Perl installed on your machine for the conversion.

Modify the file <ClearCase root path>\lib\mgrs\map and replace all occurrence of "/..\..\bin\cleardiffmrg.exe/" with “full path to your converted Perl script executable”.

That’s it and now Araxis Merge will appear whenever a compare or merge is needed by ClearCase.

No Responses
Leave a Reply

Leave it empty to submit anonymously.


Your email will never be displayed.





Close