annotate
apropos
catcr
catcs
cc.icon
cc.magic
cd
chactivity
chbl
checkin
checkout
checkvob
chevent
chflevel
chfolder
chmaster
chpool
chproject
chstream
chtype
chview
clearaudit
clearbug
cleardescribe
cleardiffbl
cleardiff
clearexport_ccase
clearexport_cvs
clearexport_pvcs
clearexport_rcs
clearexport_sccs
clearexport_ssafe
clearfsimport
cleargetlog
clearhistory
clearimport
clearjoinproj
clearlicense
clearmake
clearmake.options
clearmrgman
clearprojexp
clearprompt
cleartool
clearviewupdate
clearvobadmin
comments
config_ccase
config_spec
cptype
credmap
creds
deliver
describe
diffbl
diffcr
diff
dospace
edcs
endview
env_ccase
events_ccase
export_mvfs
exports_ccase
file
find
findmerge
fmt_ccase
getcache
get
getlog
help
hostinfo
init_ccase
ln
lock
lsactivity
lsbl
lscheckout
lsclients
lscomp
lsdo
lsfolder
lshistory
ls
lslock
lsmaster
lspool
lsprivate
lsproject
lsregion
lsreplica
lssite
lsstgloc
lsstream
lstype
lsview
lsvob
lsvtree
makefile_aix
makefile_ccase
makefile_gnu
makefile_pmake
makefile_smake
makefile_sun
man
merge
mkactivity
mkattr
mkattype
mkbl
mkbranch
mkbrtype
mkcomp
mkdir
mkelem
mkeltype
mkfolder
mkhlink
mkhltype
mklabel
mklbtype
mkpool
mkproject
mkregion
mkstgloc
mkstream
mktag
mktrigger
mktrtype
mkview
mkvob
mount_ccase
mount
msdostext_mode
mvfslog
mvfsstorage
mvfstime
mvfsversion
mv
omake
pathnames_ccase
permissions
profile_ccase
promote_server
protect
protectvob
pwd
pwv
query_language
quit
rebase
recoverview
reformatview
reformatvob
register
relocate
rename
reqmaster
reserve
rgy_backup
rgy_check
rgy_passwd
rgy_switchover
rmactivity
rmattr
rmbl
rmbranch
rmcomp
rmdo
rmelem
rmfolder
rmhlink
rmlabel
rmmerge
rmname
rmpool
rmproject
rmregion
rmstgloc
rmstream
rmtag
rmtrigger
rmtype
rmver
rmview
rmvob
schedule
schemes
scrubber
setactivity
setcache
setcs
setplevel
setsite
setview
shell
snapshot.conf
softbench_ccase
space
startview
type_manager
umount
uncheckout
unlock
unregister
unreserve
update
version_selector
view_scrubber
vob_restore
vob_scrubber
vob_sidwalk
vob_snapshot
vob_snapshot_setup
wildcards_ccase
winkin
xclearcase
xcleardiff
xmldiffmrg
SYNOPSIS
- mkattype [ –rep·lace ] [ –glo·bal [ –acq·uire ] | –ord·inary ]
- [ –vpe·lement | –vpb·ranch | –vpv·ersion ] [ –sha·red ]
[ –vty·pe { integer | real | time | string | opaque } ]
[ [ –gt low-val | –ge low-val ] [ –lt high-val | –le high-val ]
| –enu·m value[,...] ]
[ –def·ault default-val ]
[ –c·omment comment | –cfi·le comment-file-pname | –cq·uery
| –cqe·ach | –nc·omment ] attribute-type-selector ...
DESCRIPTION
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.
Attributes as Name/Value Pairs
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:
Predefined Attribute Types
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.
RESTRICTIONS
Identities
No special identity is required unless you specify the –replace option. For –replace, you must have one of the following identities:
OPTIONS AND ARGUMENTS
Handling of Name Collisions
- Default
- An error occurs if an attribute type named type-name already
exists in the VOB.
- –rep·lace
- Replaces the existing definition of type-name with
a new one. If you do not include options from the existing definition, their
values are replaced with the defaults (Exception: the type's scope does not
change; you must explicitly specify –global or –ordinary).
If you specify a comment when using –replace, the comment appears in the event record for the modification (displayed with lshistory –minor); it does not replace the object's creation comment (displayed with describe). To change an object's creation comment, use chevent.
Constraints:
- If
there are existing attributes of this type, you cannot change the –vtype value.
- If
there are existing attributes of this type or if the containing VOB is replicated,
you cannot replace a less restrictive –vpelement, –vpbranch,
or –vpversion specification with a more restrictive
one. (–vpelement is the most restrictive.)
- You
cannot replace the predefined attribute types HlinkFromText and HlinkToText.
- When
replacing an attribute type that was created with the –shared option,
you must use –shared again; that is, you cannot convert
an attribute type from shared to unshared.
- When
converting a global type to ordinary, you must specify the global type as
the attribute-type-selector argument. You cannot
specify a local copy of the global type.
- If
there are existing attributes of this type, you cannot change the –vtype value.
Specifying the Scope of the Attribute Type
- Default
- Creates an ordinary attribute type that
can be used only in the current VOB.
- –glo·bal [ –acq·uire ]
- Creates an attribute type that can be used
as a global resource by VOBs in the administrative VOB hierarchy. With –acquire, mkattype checks
all eclipsing types in the VOBs and converts them to local copies of the new
global type.
For more information, see the Administrator's Guide.
- –ord·inary
- Creates an 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.
- –vpe·lement
- Attributes of this type can be attached
only to versions; and only one version of a given element can get an attribute
of this type.
- –vpb·ranch
- Attributes of this type can be attached
only to versions; and only one version on each branch of a given element can
get an attribute of this type.
- –vpv·ersion
- Attributes of this type can be attached
only to versions; within a given element, all versions can get an attribute
of this type.
Specifying the Kind of Value
- Default
- One or more string-valued attribute types
are created.
- –vty·pe integer
- Attributes of this type can be assigned
integer values. You can use these options to restrict the possible values: –gt, –ge, –lt, –le, –enum.
- –vty·pe real
- Attributes of this type can be assigned
floating-point values. You can use these options to restrict the possible
values: –gt, –ge, –lt, –le, –enum.
- –vty·pe time
- Attributes of this type can be assigned
values in the date-time format described in the mkattr reference
page. You can use these options to restrict the possible values: –gt, –ge, –lt, –le, –enum.
- –vty·pe string
- Attributes of this type can be assigned
character-string values. You can use the –enum option
to restrict the possible values.
- –vty·pe opaque
- Attributes of this type can be assigned
arbitrary byte sequences as values.
Mastership of the Attribute Type
- Default
- Attempts to attach or remove attributes
of this type succeed 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.
- –sha·red
- If you specify –vpbranch, –vpelement,
or –vpversion, ClearCase and ClearCase LT check
the mastership of the branch, element, or version's branch to which you attach
or remove the attribute when you invoke the mkattr or rmattr command. If you do not specify –vpbranch, –vpelement,
or –vpversion, and the object to which you attach or
remove the attribute is a version, mastership of the branch is checked when
you invoke the mkattr or rmattr command.
If you do not specify –vpbranch, –vpelement,
or –vpversion, and the object to which you attach or
remove the attribute is not a version, the mastership of the object is checked
when you invoke the mkattr or rmattr command.
If a type is global and shared, additional mastership restrictions exist when you create instances of the type. You cannot create instances of the type unless the client VOB contains a local copy of the type, or the administrative VOB at the current site masters the type. For more information, see the Administrator's Guide.
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.
- –gt low-val or –ge low-val
- Lower bound of an integer, real, or time
value. –gt means greater than. –ge means
greater than or equal to.
- –lt high-val or –le high-val
- Upper bound of an integer, real, or time
value. –lt means less than. –le means
less than or equal to.
- –enu·m value[,...]
- Comma-separated list (no white space allowed)
of permitted values for any value type. See the description of the value argument
in the mkattr reference page for details
on how to enter the various kinds of value arguments.
Specifying a Default Attribute Value
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.
- –c·omment comment | –cfi·le comment-file-pname |–cq·uery | –cqe·ach | –nc·omment
- Overrides the default with the option you
specify. See the comments reference page.
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.
- attribute-type-selector ...
- Names of the attribute types to be created.
Specify attribute-type-selector in the form [attype:]type-name[@vob-selector]
EXAMPLES
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.
- Create a string-valued attribute type named 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.
- Create a string-valued attribute type named QAed, with an enumerated list of valid values.
- 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.
- Create a time-valued attribute type named QA_date, with the current date as the default value. Provide a comment on the command line.
- On a UNIX system, create an enumerated attribute type, with a default value, called Released.
- Change the default value of an existing attribute type named TESTED. Provide a comment on the command line.