ClearCase Guiffy Diff/Merge Integration
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:
- 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.
-
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.
-
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.
-
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 Guiff install folder includes 2 applications for integration with the ClearCase
type manager --- 1) GuiffyCCDiffMerge which processes compare and merge actions and
2) GuiffyCCXDiffMerge which processes xcompare and xmerge actions. Change the application
for the compare and merge actions to the full path for the GuiffyCCDiffMerge application and
change the application for the xcompare and xmerge actions to the full path for the
GuiffyCCXDiffMerge application. Your modifications should look like:
text_file_delta compare C:\Program Files\Guiffy74\GuiffyCCDiffMerge.exe
text_file_delta xcompare C:\Program Files\Guiffy74\GuiffyCCXDiffMerge.exe
text_file_delta merge C:\Program Files\Guiffy74\GuiffyCCDiffMerge.exe
text_file_delta xmerge C:\Program Files\Guiffy74\GuiffyCCXDiffMerge.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/guiffy74/GuiffyCCDiffMerge
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/guiffy74/GuiffyCCDiffMerge
-r-xr-xr-x 1 root Feb 11 2005 tfdmgr
lrwxrwxrwx 1 root Dec 17 2005 xcompare -> /opt/guiffy/guiffy74/GuiffyCCXDiffMerge
lrwxrwxrwx 1 root Dec 17 2005 xmerge -> /opt/guiffy/guiffy74/GuiffyCCXDiffMerge
Custom ClearCase integrations
Customers can also develop their own ClearCase type managers either by using Guiffy's Java API
packakge (which is how the GuiffyCC applications were developed) or by using the command
line interfaces for the Guiffy, Jiff, and SureMerge utilities. And, there are
other ways to modify and manage the type manager settings. See
Joerg Moeller's document
for further discussion of these topics and his Perl-based type manager implementation
which utilizes the Guiffy, Jiff, and SureMerge command line interfaces.