How to change default reversal tools
You can specify an external comparison tool to change the map file to "c: \ program files \ rational \ ClearCase \ Lib \ MGRS"
WinMerge, proposed by Paul, actually modifies this file.
Each card has 3 parts: CC file type, CC action and application.
Locate the section in the map file for the text_file_delta file types. There you will find lines for comparing the actions of CC, xcompare, merge and xmerge, which look like this:
text_file_delta compare ..\..\bin\cleardiff.exe text_file_delta xcompare ..\..\bin\cleardiffmrg.exe text_file_delta merge ..\..\bin\cleardiff.exe text_file_delta xmerge ..\..\bin\cleardiffmrg.exe
You can replace them with the executable file of your comparison tool .
Or a simple diff script
If you want to use the full command line (which I like ;-)), a little ccperl might help:
#!/bin/perl my ($file, $switches) = @ARGV; $switches ||= '-ubBw'; my ($element, $version, $pred) = split(/;/,`cleartool describe -fmt '%En;%Vn;%PVn' $file`); unless ($pred) { die "ctdiff: $file has no predecessor\n"; } exec "mydiff $switches $element\@\@$pred $file";
Warning: the extended path name ( @@\... ) is only available in the dynamic view ( M:\... , not a snapshot ( c:\... ).
The script has nothing to do with the map file above:
- this file defines "Type Merge Managers".
- This script allows you to run any merge manager for any file you want, without reading any map file, in order to look for a suitable diff exe to use for this file.
Here you provide the script with both information: the file (as a parameter) and diff exe to run (as part of the script implementation: replace mydiff with any other option you want).
Or, improved diff script (also works in static / snapshot view)
Here is a version of this script that works for both snapshot and dynamic viewing.
To represent the snapshot, I use the chacmool clause: cleartool get .
Again, you can replace the diff included in this script with the tool of your choice.
#!/bin/perl my ($file, $switches) = @ARGV; $switches ||= '-u'; my ($element, $version, $pred) = split(/;/,`cleartool describe -fmt '%En;%Vn;%PVn' $file`); unless ($pred) { die "ctdiff: $file has no predecessor\n"; }