Creates or updates an element type object
ClearCase (cleartool subcommand), Attache (command)
The mkeltype command creates one or more user-defined element types for future use within a VOB. User-defined element types are variants of the ClearCase predefined types. (See complete list in the section Predefined Element Types.) After creating an element type, you can create elements of that type using mkelem, or change an existing element's type using chtype. To remove an element type, use the rmtype command.
NOTE: You cannot remove an element type from a replicated VOB.
In some cases, you can select the merge behavior of an element type when you create it. This is true for element types of elements used in a UCM deliver or rebase operation. (See the deliver and rebase reference pages). There are three kinds of behaviors, described here with their associated keywords.
| Keyword | Behavior |
|---|---|
auto (default) | A ClearCase findmerge operation attempts to merge elements of this type. |
user | A ClearCase findmerge operation performs trivial merges only. Nontrivial merges must be made manually. |
never | A ClearCase findmerge operation ignores elements of this type. The never attribute is useful for working with files such as binary files or bitmap graphics images. |
To specify a behavior, use one of the keywords as the argument to the -mergetype option. If the option is not specified, automatic merge behavior is in effect for elements of this element type.
When you create a new element type, you must specify an existing element type as its supertype. The new element type inherits the type manager of the supertype, unless you use the -manager option. The type manager performs such tasks as storing/retrieving the contents of the element's versions. (See the type_manager reference page.)
For example, you create an element type c_source, with text_file as the supertype; c_source inherits the type manager associated with the text_file supertype-the text_file_delta manager.
You can use the lstype command to list both the supertype and the type manager of an element type.
Each VOB is created with the following element types:
file | Versions can contain any kind of data (text, binary, bitmap, and so on). Uses the whole_copy type manager. |
compressed_file | Versions can contain any kind of data. Uses the z_whole_copy type manager. |
text_file | All versions must contain text (multibyte text characters are allowed). Null bytes are not permitted (a byte of all zeros); no line can contain more than 8,000 characters. Uses the text_file_delta type manager. |
compressed_text_file | All versions must contain text; no line can contain more than 8,000 characters. Uses the z_text_file_delta type manager. |
binary_delta_file | Versions can contain any kind of data. Uses the binary_delta type manager. |
html | Subtype of the text_file element type. Uses the _html type manager. |
ms_word | Subtype of the file element type. All versions must be Microsoft Word files. Uses the _ms_word type manager. |
rose | Subtype of the text_file element type. Uses the _rose type manager. |
xml | Subtype of the text_file element type. Uses the _xml type manager. |
directory | Versions of a directory element catalog (list the names of) elements and VOB symbolic links. Uses the directory type manager, which compares and merges versions of directory elements. |
file_system_object | Generic element type, with no associated type manager. |
You can use any of these element types as the -supertype specification.
This section applies to the element types text_file and compressed_text_file, to all subtypes of these types, and to all user-defined element types derived from them through the supertype mechanism.
When a load operation is issued from a snapshot view, or a user program accesses a version through a dynamic view, the type manager handles it as follows:
On subsequent accesses to the same version, steps 1 and 2 are skipped; the program accesses the existing cleartext file, which is cached in the cleartext storage pool.
Operating systems vary in their use of text-file line terminators. To avoid confusion, each ClearCase view has a text mode, which determines the line terminator for text files in that view. (See the mkview reference page.) After the type manager constructs a cleartext file for a version, its line terminators may be adjusted before the version is presented to the calling program. Adjustment of line terminators can also occur when the checkout command copies a version of a text file element, creating a view-private file (the checked-out version).
Permissions Checking: For each object processed, you must be one of the following (with -replace only): type owner, VOB owner, member of the ClearCase group. See the permissions reference page.
Locks: An error occurs if any of the following objects are locked: VOB, element type (with -replace only).
HANDLING OF NAME COLLISIONS. Default: An error occurs if an element type named type-name already exists in the VOB.
|
|
SPECIFYING THE SCOPE OF THE ELEMENT TYPE. Default: Creates an ordinary element type that can be used only in the current VOB.
SUPERTYPE / TYPE MANAGER INHERITANCE. Default: None. You must specify a supertype; the new element type inherits the type manager of this supertype, unless you use the -manager option.
type-name | Name of the element type See the Object Names section in the cleartool reference page for rules about composing names. | |
vob-selector | Object-selector for a VOB, in the form [vob:]pname-in-vob. The pname-in-vob can be the pathname of the VOB-tag (whether or not the VOB is mounted) or of any file-system object within the VOB (if the VOB is mounted) | |
CONTROLLING VERSION-CREATION TIME. Default: For all elements of the newly created type: when a new version is checked in, its time stamp is set to the checkin time.
MERGETYPE. Default: Instantiations of the new element type use automatic merging.
SUGGESTED ATTRIBUTES. Default: The new element type has no list of suggested attributes.
type-name | Name of the attribute type See the Object Names section in the cleartool reference page for rules about composing names. | |
vob-selector | Object-selector for a VOB, in the form [vob:]pname-in-vob. The pname-in-vob can be the pathname of the VOB-tag (whether or not the VOB is mounted) or of any file-system object within the VOB (if the VOB is mounted) | |
EVENT RECORDS AND COMMENTS. Default: Creates one or more event records, with commenting controlled by your .clearcase_profile file (default: -cqe). See CUSTOMIZING COMMENT HANDLING in the comments reference page. Comments can be edited with chevent.
NAMING THE ELEMENT TYPES. Default: The element type is created in the VOB that contains the current working directory unless you specify another VOB with the @vob-selector argument.
type-name | Name of the element type See the Object Names section in the cleartool reference page for rules about composing names. | |
vob-selector | Object-selector for a VOB, in the form [vob:]pname-in-vob. The pname-in-vob can be the pathname of the VOB-tag (whether or not the VOB is mounted) or of any file-system object within the VOB (if the VOB is mounted) | |
Examples including wildcards or quoting are written for use in cleartool interactive mode. If you use cleartool single-command mode, you may need to change the wildcards and quoting to make your command interpreter process the command appropriately.
In cleartool single-command mode, cmd-context represents the command interpreter prompt. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt. In Attache, cmd-context represents the workspace prompt.
cmd-context mkeltype -supertype text_file -nc c_source
Created element type "c_source".
cmd-context mkeltype -supertype file -nc bin_file
Created element type "bin_file".
cmd-context mkeltype -supertype bin_file -attype Confidence_Level,QAed -nc exe_file
Created element type "exe_file".
cmd-context mkeltype -supertype directory -c "directory type for include files" incl_dir
Created element type "incl_dir".
cmd-context mkeltype -replace -supertype bin_file -ptime ^
-c "change archive mod time default" archive
Replaced definition of element type "archive".
cmd-context mkeltype -supertype file -mergetype never -nc grph_file
Created element type "grph_file".
checkin, chtype, describe, lstype, mkelem, rmtype, rename, type_manager, type_object
|
Feedback on the documentation in this site? We welcome any comments!
Copyright © 1999 by Rational Software Corporation. All rights reserved. |