Creates or updates an attribute type object
Product | Command Type |
|---|---|
ClearCase | cleartool subcommand |
ClearCase LT | cleartool subcommand |
Attache | command |
Platform |
|---|
UNIX |
Windows |
The mkattype command creates one or more attribute types for future use within a VOB. After creating an attribute type in a VOB, you can use mkattr to attach attributes of that type to objects in that VOB.
An attribute is a name/value pair. When creating an attribute type, you must specify the kind of value (integer, string, and so on). You can also restrict the possible values to a particular list or range. For example:
Attributes of type FUNC_TYPE could be restricted to integer values in the range 1-5
Attributes of type QAed colud be restricted to the string values TRUE and FALSE.
Each new VOB is created with two string-valued attributes types, named HlinkFromText and HlinkToText. When you enter a mkhlink -ftext command, the from-text you specify is stored as an instance of HlinkFromText on the hyperlink object. Similarly, an HlinkToText attribute implements the to-text of a hyperlink.
Identities: No special identity is required unless you specify the -replace option. For -replace, you must have one of the following identities:
Type owner
VOB owner
root (UNIX)
Member of the ClearCase group (ClearCase on Windows)
Local administrator of the ClearCase LT server host (ClearCase LT on Windows)
Locks: An error occurs if one or more of these objects are locked: VOB, attribute type (for -replace only).
Mastership: (Replicated VOBs only) With -replace, your current replica must master the type.
HANDLING OF NAME COLLISIONS. Default: An error occurs if an attribute type named type-name already exists in the VOB.
|
|
|
|
|
SPECIFYING THE SCOPE OF THE ATTRIBUTE TYPE. Default: Creates an ordinary attribute type that can be used only in the current VOB.
INSTANCE CONSTRAINTS. Default: In a given element, one attribute of the new type can be attached to each version, to each branch, and to the element itself. One attribute of the type can be attached to other types of VOB objects.
SPECIFYING THE KIND OF VALUE. Default: One or more string-valued attribute types are created.
MASTERSHIP OF THE ATTRIBUTE TYPE. Default: Attempts to attach or remove attributes of this type succeeda only in the VOB replica that is the current master of the attribute type. The VOB replica in which the new attribute type is created becomes its initial master.
RESTRICTING THE POSSIBLE VALUES. Default: The values that can be assigned to attributes of the new type are unrestricted within the basic value type (any integer, any string, and so on). You can specify a list of permitted values, using -enum; alternatively, you can specify a range using -gt or -ge to specify the lower bound, and -lt or -le to specify the upper bound.
SPECIFYING A DEFAULT ATTRIBUTE VALUE. Default: You cannot use mkattr -default to create an instance of this attribute type; you must specify an attribute value on the command line.
EVENT RECORDS AND COMMENTS. Default: Creates one or more event records, with commenting controlled by your .clearcase_profile file (default: -cqe). See the comments reference page. Comments can be edited with chevent.
NAMING THE ATTRIBUTE TYPES. Default: The attribute 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 attribute type See t the cleartool reference page for rules about composing names. | |
vob-selector | VOB specifier Specify vob-selector in the form [vob:]pname-in-vob | |
pname-in-vob | 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) | |
The UNIX examples in this section are written for use in csh. If you use another shell, you may need to use different quoting and escaping conventions.
The Windows examples that include 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 UNIX shell or Windows command interpreter prompt, followed by the cleartool command. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt. In Attache, cmd-context represents the workspace prompt.
Create a string-valued attribute type named Responsible.
cmd-context mkattype -nc Responsible
Created attribute type "Responsible".
Create an integer-valued attribute type named Confidence_Level, with a low value of 1 and a high value of 10. Constrain its use to one per branch.
cmd-context mkattype -nc -vpbranch -vtype integer -gt 0 -le 10 Confidence_Level
Created attribute type "Confidence_Level".
Create a string-valued attribute type named QAed, with an enumerated list of valid values.
cmd-context mkattype -nc -enum '"TRUE","FALSE","in progress"' QAed
Created attribute type "QAed".
On a Windows system in cleartool interactive mode, create an enumerated attribute type, with a default value, called Released.
cleartool> mkattype -nc -enum "TRUE","FALSE" -default "FALSE" Released
Created attribute type "Released".
The same command in cleartool single-command mode shows the difference in quoting.
cleartool mkattype -nc -enum \"TRUE\",\"FALSE\" -default \"FALSE\" Released
Created attribute type "Released".
Create a time-valued attribute type named QA_date, with the current date as the default value. Provide a comment on the command line.
cmd-context mkattype -c "attribute for QA date" -vtype time -default today QA_date
Created attribute type "QA_date".
On a UNIX systems, create an enumerated attribute type, with a default value, called Released.
cmd-context mkattype -nc -enum "'TRUE","FALSE'" -default "'FALSE'" Released
Created attribute type "Released".
Change the default value of an existing attribute type named TESTED. Provide a comment on the command line.
cmd-context mkattype -replace -default '"TRUE"' -c "changing default value" TESTED
Replaced definition of attribute type "TESTED".
lstype, mkattr, rename, rmattr
|
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |