ClearCase Guiffy Diff/Merge Integration

During Guiffy install select the Add-Ons Install Set option to include the ClearCase Diff/Merge Integration tools.

To integrate Guiffy with ClearCase first ensure that the guiffy install folder has been added to your PATH environment variable.

ClearCase integration with external 3rd-party diff/merge products is accomplished through its type manager. The type managers are defined in your ClearCase folder\lib\mgrs\map. Each map line has 3 parts: the CC filetype, the CC action, and the application. Find the section in the map file for text_file_delta file types. There you will find lines for CC actions compare, 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
These are the type manager entries we need to change to plug-in Guiffy. Each action is described as follows:
  1. The compare action is called to compare files --- if there are no differences(found by running GuiffyDiff quick text verify component), it quits and returns an exitcode=0, if there are differences, it runs the xcompare GUI GuiffyFrame component.
  2. The merge action is called to merge files --- if there are no differences(found by running GuiffyDiff quick text verify component), it copies the first file to the merge result file, quits and returns an exitcode=0, if there are differences, it performs a non-GUI SureMerge 3-way auto-merge --- if there are no Attentions and the merge result is saved, it quits and returns an exitcode=0, otherwise it runs the xmerge GUI Guiffy 3-way SureMerge GuiffyFrame component.
  3. The xcompare action is called to compare files in a visual GUI application --- it runs the GUI GuiffyFrame component. if there are no differences on exit it returns an exicode=0, otherwise the exitcode=1.
  4. The xmerge action is called to merge files in a visual GUI 3-way, auto-merge application --- if there are no differences(found by running GuiffyDiff quick text verify component), it copies the first file to the merge result file, quits and returns an exitcode=0, if there are differences, it runs the GUI GuiffyFrame component to perform a Guiffy SureMerge 3-way merge --- if there are no unresolved Attentions and the merge result is saved, it quits and returns an exitcode=0, otherwise the exitcode=1.
The Guiffy install folder includes 4 applications for integration with the ClearCase type manager --- the application names are the same as the CC actions. Change the application for each action to the full path for the Guiffy CC application. Note: ClearCase has problems if the full path includes spaces - So, change Guiffy's default install location to avoid "Program Files" to something like "GuiffyFiles". Your modifications should look like:
text_file_delta   compare          C:\GuiffyFiles\Guiffy106\compare.exe
text_file_delta   xcompare         C:\GuiffyFiles\Guiffy106\xcompare.exe
text_file_delta   merge            C:\GuiffyFiles\Guiffy106\merge.exe
text_file_delta   xmerge           C:\GuiffyFiles\Guiffy106\xmerge.exe
Thats it. Now from ClearCase when you do a text file compare or 3-way merge, Guiffy will be executed in place of the builtin compare & merge utilities.

The GuiffyCC applications work with ClearCase Dynamic and Snapshot views. The GuiffyCC applications use the Guiffy Saved Settings for persistence of all of Guiffy's options and the screen size/location etc.. Any ClearCase options passed to the GuiffyCC applications are applied and override the Saved Setttings.

The GuiffyCC applications include a debug logging mechanism. To enable the debug logging, create an empty file "GuiffyCCDiffMergeLog.txt" in the .guiffy configuration folder. Debug log messages from the GuiffyCC modules are appended to the file. To disbale the debug logging, delete or rename the "GuiffyCCDiffMergeLog.txt" file.

Linux/Unix platforms

Unlike on Windows, there is no ClearCase type manager map file on UNIX/Linux platforms. Instead, for each type manager, there is a corresponding directory under /opt/rational/clearcase/lib/mgrs. For example, for text files, there is a directory /opt/rational/clearcase/lib/mgrs/text_file_delta. Inside this directory, each file is an executable for the named action. The file node can be a symbolic link to the actual executable file.

Example of text_file_delta directory contents at /opt/rational/clearcase/lib/mgrs/text_file_delta:
lrwxrwxrwx    1 root    Dec 17  2005 annotate -> tfdmgr
lrwxrwxrwx    1 root    Dec 17  2005 compare -> ../../../bin/cleardiff 
lrwxrwxrwx    1 root    Dec 17  2005 construct_version -> tfdmgr  
lrwxrwxrwx    1 root    Dec 17  2005 create_branch -> tfdmgr 
lrwxrwxrwx    1 root    Dec 17  2005 create_element -> tfdmgr 
lrwxrwxrwx    1 root    Dec 17  2005 create_version -> tfdmgr 
lrwxrwxrwx    1 root    Dec 17  2005 delete_branches_versions -> tfdmgr 
lrwxrwxrwx    1 root    Dec 17  2005 get_cont_info -> tfdmgr 
lrwxrwxrwx    1 root    Dec 17  2005 merge -> ../../../bin/cleardiff 
-r-xr-xr-x    1 root    Feb 11  2005 tfdmgr
lrwxrwxrwx    1 root    Dec 17  2005 xcompare -> ../../../bin/xcleardiff 
lrwxrwxrwx    1 root    Dec 17  2005 xmerge -> ../../../bin/xcleardiff 
To setup the Guiffy type managers after installing Guiffy change the compare, merge, xcompare, and xmerge file nodes as follows:
lrwxrwxrwx    1 root    Dec 17  2005 annotate -> tfdmgr
lrwxrwxrwx    1 root    Dec 17  2005 compare -> /opt/guiffy/Guiffy106/compare 
lrwxrwxrwx    1 root    Dec 17  2005 construct_version -> tfdmgr  
lrwxrwxrwx    1 root    Dec 17  2005 create_branch -> tfdmgr 
lrwxrwxrwx    1 root    Dec 17  2005 create_element -> tfdmgr 
lrwxrwxrwx    1 root    Dec 17  2005 create_version -> tfdmgr 
lrwxrwxrwx    1 root    Dec 17  2005 delete_branches_versions -> tfdmgr 
lrwxrwxrwx    1 root    Dec 17  2005 get_cont_info -> tfdmgr 
lrwxrwxrwx    1 root    Dec 17  2005 merge -> /opt/guiffy/Guiffy106/merge 
-r-xr-xr-x    1 root    Feb 11  2005 tfdmgr
lrwxrwxrwx    1 root    Dec 17  2005 xcompare -> /opt/guiffy/Guiffy106/xcompare 
lrwxrwxrwx    1 root    Dec 17  2005 xmerge -> /opt/guiffy/Guiffy106/xmerge 

Custom ClearCase integrations

Customers can also develop their own ClearCase type managers either by using Guiffy's Java API packakge (which is how the Guiffy CC applications were developed) or by using the command line interfaces for the Guiffy, Jiff, and SureMerge utilities.

Documentation by Guiffy Software, Inc. 2014