®
IBM Software Group
Essentials of Rational ClearCase Module 8: Applying ClearCase Metadata
1
Objectives Upon completing this module, you should be able to:
Define metadata and explain its purpose
List the kinds of ClearCase metadata and explain the main uses of each
Use labels, attributes, and hyperlinks
2
Topics What is metadata? Metadata uses Applying metadata
3
What Is Metadata? A set of constructs and annotations that attach to ClearCase objects Allows you to organize, manipulate, and manage those objects Enables you to: Find, list, sort, and retrieve information Access work faster and more directly Organize tasks Manage how development tasks are performed Capture information beyond what ClearCase captures by default Enforce policies 4
Kinds of Metadata Kinds Elements Branches Labels
Attributes
hello.c /bugfix
/main
Triggers Hyperlinks
Types Specific definitions of the kind dedicated to particular uses
Instances One example of a given type applied to one or more ClearCase objects 5
Kind: branch Type: bugfix Instance : hello.c@@/main/bugfix
Topics What is metadata?
Metadata uses Applying metadata
6
Structuring the Project: Elements and Branches Elements Define element storage and retrieval characteristics May be used to group elements for special handling
Branches Provide areas for task isolation and integration
7
Annotating the Project: Labels and Attributes Labels and attributes enable project annotation Describe significant milestones, status flags, and tasks: • • • •
Branch points Build configurations Baselines Status messages
Identify starting points for future projects Identify release configurations
8
Using Labels User-defined names that can be attached to versions Uniquely identify a version Identify a significant task or project milestone Typically static
9
Using Attributes Name and value pair Can annotate any ClearCase object Use to represent properties that can have many possible values Example: BugNum=22, 43, 54
Use to represent properties that change over time Example: tested=“no”, “ready”, “yes”, “passed”, “failed” 10
Managing Project Policies: Triggers Triggers define actions to be performed in response to a ClearCase event Events are ClearCase operations that modify a VOB element including check out and check in Actions include launching batch files, executables, or another ClearCase operation
Are local to a single VOB
11
Managing Project Policies: Triggers (cont.) Triggers support project policy implementation Project policies are rules that: Enforce project methodology Automate routine operations Enforce site development policies
Defined by project leads, configuration managers, or ClearCase administrators — developers typically see only the results Project policies vary from site to site 12
Managing Project Policies: Triggers (cont.) Pre-event triggers Performed before the event Used to enforce policies Example: A trigger that prevents anyone but project leads from declaring branch types
Post-event triggers Performed after a successful event Used to provide information or initiate further actions Example: A trigger that attaches an attribute with a particular bug fix number to a version upon check in 13
Showing Project Relationships: Hyperlinks A logical connection between any two VOB objects Allow you to identify and preserve relationships between VOB objects Can show a relationship between objects in different VOBs Automatically created by merge operation
14
Topics What is metadata? Metadata uses
Applying metadata
15
Viewing Metadata Types: Type Explorer Start > Programs > Rational > ClearCase > Type Explorer
Metadata kinds
Metadata types
16
Creating a Label Instance: Applying a Label 1 In the Version Tree Browser, select the version you want to label, and then click Tools > Apply Label.
2 Select the desired label, and then click Apply.
17
Viewing a Label You can view labeled versions in the Version Tree Browser or on the Labels tab of Version Properties. Labels often specify a release or a nightly build.
18
Using the Apply Label Wizard The Apply Label Wizard applies a label to versions selected by a specified view. Start > Programs > Rational > ClearCase > Apply Label 1 Enter the view that selects the versions you want to label, and then click Next. 2 Select the elements to label, and then click Next.
19
Using the Apply Label Wizard (cont.) 3 Select the label to apply, choose options, and then click Finish.
4 Confirm the application, and then click OK.
20
Adding Attributes 1 Click the Custom tab on the Properties sheet of the object to be annotated.
2 Click Add Attribute on the shortcut menu.
3 Enter the Attribute type and Value, and then click OK. 4 Click OK. 21
Attaching a Hyperlink Use cleartool mkhlink to attach hyperlinks to VOB objects. Example: I:\project_hw>cleartool mkhlink Implements src\hello.c doc\hello.txt Created hyperlink "Implements@501@\Project_X".
22
Module Review What is metadata? How is metadata implemented? When might you use a label? When might you use an attribute? What is a trigger? When might you use one? When might you use a hyperlink? How do you attach a label? How do you attach an attribute? How do you attach a hyperlink? 23
Module Lab In this lab, you will perform the following tasks: Apply a label to multiple files at once Apply an attribute Apply a hyperlink
24