Question & Answer
Which methods are available to manage binary files that are stored in an IBM® Rational® ClearCase® VOB in either a base ClearCase or UCM environment?
Overview Binary files are handled in UCM the same way they are handled in base ClearCase; they cannot be merged. ClearCase can only merge text files; therefore a different strategy must be deployed in order to manage change related to binary content.
In order to effectively manage binary files in ClearCase, new element types must be defined to handle these file types. The following options are available:
Note: The following instructions are taken from the point of view of the Microsoft® Windows® operating system. The steps may differ on UNIX® and Linux®, but the concepts apply exactly.
Binary files are handled in UCM the same way they are handled in base ClearCase; they cannot be merged.
ClearCase can only merge text files; therefore a different strategy must be deployed in order to manage change related to binary content.
Instructions for non-replicated VOBs
Note: The element type can be created from command line or the GUI.
- Reuse an existing element type or Create a new one from the command line or GUI. See step 2 if the element type already exists.
Review the ClearCase Reference Guide on the topic of mkeltype (cleartool man mkeltype) for more details.
GUI example > Create:
- Open Type Explorer GUI for the VOB (Start > Programs > Rational ClearCase> Type Explorer)
- Select the VOB where binary files exist.
- Open the element type folder
- Right-click and create a new element type.
- Give the element type a name (for example NEVER_MERGE or COPY or any name of your choosing).
- Click OK
Never consider elements of this type for merging
Always copy elements of this type (ClearCase 7.0 or later)
Review the ClearCase Reference Guide on the topic of chtype (cleartool man chtype) for more details.
Review the ClearCase Reference Guide on the topic of cc.magic, default.magic (cleartool man cc.magic) for more details.
Instructions for replicated VOBs
The same steps are required as above; however, the element types need to be created from the command line in a replicated environment .
Note: The GUI can only be used in non-replicated VOBs; if ClearCase MultiSite is enabled, then you will not be able to remove an element type or change the definition of an element type from theType Explorer, and the command line syntax must be used.
Review technote 1148740 Changing used element types in a replicated VOB for additional information about working with element types in a replicated VOB.
Never Merge Example:
M:\view\vob>cleartool mkeltype -supertype file -mergetype never -nc FILE_NEVER_MERGE
Created element type "FILE_NEVER_MERGE".
M:\view\vob>cleartool mkeltype -supertype compressed_file -mergetype copy -nc COMPRESSED_FILE_COPY_MERGE
Created element type "COMPRESSED_FILE_COPY_MERGE".
The definitions for trivial and manual merging
Trivial: The base and the destination versions of the element are the same.
This means the element can simply be copied from the source to the destination view. A trivial merge is automatically determined by merge or findmerge and thus will be taken care of for you.
Manual: The source and destination versions of the element contain one or more conflicts that you must resolve. A manual merge thus requires that you:
- Check out the destination version.
- Copy the data from the source version to the destination version.
- Checkin the destination version.
- Manually draw the merge arrow in a version tree GUI or you can run the 'cleartool merge' command with a -ndata switch to manually establish the merge arrow between the source and destination versions.
Was this topic helpful?
16 June 2018