The concept of element types allows ClearCase to handle each class of elements differently. An element type is a class of file elements. ClearCase includes predefined element types, such as file and text_file, and lets you define your own. When you create an element type for use in UCM projects, you can specify a mergetype attribute, which determines how deliver and rebase operations handle merging of files of that element type.
When ClearCase encounters a merge situation during a deliver or rebase operation, it attempts to merge versions of the element. ClearCase requires user interaction only if it cannot reconcile differences between the versions. For certain types of files, you may want to impose different merging behavior.
Some types of files never need to be merged. For these files, you may want to ensure that no one attempts to merge them accidentally. For example, the deployment, or staging, component contains the executable files that you ship to customers or install in-house. These files are not under development; they are the product of the development phase of the project cycle. For these types of files, you can create an element type and specify never merge behavior.
NOTE: If you fail to specify never merge behavior for these elements, developers may encounter problems when they attempt to deliver work to the project's integration stream. Developers create executable files when they build and test their work prior to delivering it. If these files are under version control as derived objects, they are included in the current activity's change set. During a deliver operation, ClearCase attempts to merge these executable files to the integration stream unless the files are of an element type for which never merge behavior is specified.
For some types of files, you may want to merge versions manually rather than let ClearCase merge them. One example is a Visual Basic form file, which is a generated text file. Visual Basic generates the form file based on the form that a developer creates in the Visual Basic GUI. Rather than let ClearCase change the form file during a merge operation, you want to regenerate the form file from the Visual Basic GUI.
For these types of files, you can create an element type and specify user merge behavior. For information on creating element types, see Chapter 15, Using Element Types to Customize Processing of File Elements, and the mkeltype reference page in the Command Reference.
When you define an element type, its scope can be ordinary or global. By default, the element type is ordinary; it is available only to the VOB in which you create it. If you create the element type in an administrative VOB and define its scope as global, other VOBs that have AdminVOB hyperlinks to that administrative VOB can use the element type. If you want to define an element type globally, and you do not currently use a separate administrative VOB, define the element type in the PVOB.
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |