ClearCase Fundamentals
Course Goals <ul><li>Introduce SCM </li></ul><ul><li>Demonstrate typical developer workflow </li></ul><ul><li>Identify oth...
What this course does not cover? <ul><li>Complete implementation of software configuration management </li></ul><ul><li>Co...
Introduction to SCM
Software Configuration Management (SCM) SCM “ SCM is about managing change to software” Brian White , Software Configurati...
What is SCM? <ul><li>SCM is a software engineering discipline comprising the tools and techniques (processes or methodolog...
Why SCM? <ul><li>Multiple individuals work on software that is changing. </li></ul><ul><li>More than one version of the so...
Why SCM? (Cont) <ul><li>A successful SCM effort ensures : </li></ul><ul><ul><li>Safety </li></ul></ul><ul><ul><li>Stabilit...
SCM Tools <ul><li>ClearCase - Rational Software  </li></ul><ul><li>Visual Source Safe - Microsoft </li></ul><ul><li>PVCS -...
Introduction to Rational ClearCase Family
IBM Rational ClearCase family <ul><li>Provides software asset management </li></ul><ul><li>through features such as versio...
ClearCase family – At a glance
ClearCase LT
ClearCase
ClearCase MultiSite
Capabilities <ul><li>Manage change across the software life cycle—from design to code to test </li></ul><ul><li>Simplify d...
Capabilities (cont) <ul><li>Support asset-based development for software reuse </li></ul><ul><li>Speed application deliver...
Capabilities (cont) <ul><li>Improve the ability to meet regulatory requirements with audit support </li></ul><ul><li>Scale...
ClearCase implements SCM  <ul><li>Version control </li></ul><ul><ul><li>Version all types of files and directories </li></...
ClearCase Roles <ul><li>ClearCase developer </li></ul><ul><ul><li>Set up workspace </li></ul></ul><ul><ul><li>Make changes...
ClearCase Roles (cont) <ul><li>ClearCase Configuration manager </li></ul><ul><ul><li>Write CM plan </li></ul></ul><ul><ul>...
ClearCase Roles (cont) <ul><li>ClearCase administrator </li></ul><ul><ul><li>Setup hardware environment </li></ul></ul><ul...
Typical Developer Workflow
Typical Developer Workflow <ul><li>Set up workspace </li></ul><ul><li>Create a view </li></ul><ul><li>Start a view </li></...
Typical Workflow: Setting Up Your Workspace <ul><li>Set up workspace </li></ul><ul><li>Create a view </li></ul><ul><li>Sta...
What is a Versioned Object Base (VOB)? <ul><li>A permanent, read-only data repository that: </li></ul><ul><ul><li>Stores f...
VOB
Projects and VOBs <ul><li>A project can span more than one VOB </li></ul><ul><li>Multiple projects can share common VOBs <...
What is an Element? <ul><li>A file or directory, under source control, stored in a ClearCase VOB </li></ul><ul><li>Can be ...
What is a Version? <ul><li>An element consists of a set of versions, organized into a version tree </li></ul><ul><li>Each ...
What is a View? <ul><li>A ClearCase mechanism that allows users access to versions of elements in VOBs </li></ul><ul><li>A...
What is a Configuration Specification? <ul><li>For each view, a set of ordered rules used to select at most one version of...
Types of Views <ul><li>Dynamic views   </li></ul><ul><ul><li>use the ClearCase multi version file system (MVFS) to provide...
Which Type of View Should I Use? <ul><ul><li>Dynamic </li></ul></ul><ul><ul><li>You want to access elements in repositorie...
Structure of a Dynamic View VOB 0 1 2 Hello.c Util.c hello.c Read/write util.c Read-only Virtual File System View Storage ...
Structure of a Snapshot View VOB 0 1 2 hello.c util.c hello.c Read/write copy util.c Read-only copy Local File System Conf...
Shortcut Pane Folder Pane Details Pane Information Pane Intro to ClearCase Explorer
Creating a Dynamic View 1 Launch the  View Creation Wizard Toolbox tab 2 Select  Dynamic View
Creating a Dynamic View (Cont.) 3 Choose a view name (or view-tag) 4 Select a drive letter to which you want to connect th...
Starting a View 1 Click  Start View 2 Select the view you want to start, and then click  OK <ul><li>Each view has a unique...
Mounting a VOB for Dynamic Views <ul><li>The mount command activates a VOB for use on the local workstation </li></ul><ul>...
Typical Workflow: Work on Files <ul><li>Work on Files </li></ul><ul><li>Configure workspace </li></ul><ul><li>Check out fi...
Checkout / Checkin Model <ul><ul><li>When a file is under source control, you check it out to work on it  </li></ul></ul><...
View before and after Checking out VOB 0 1 2 Hello.c Util.c hello.c Read/write util.c Read-only View display View Storage ...
Types of Checkout <ul><ul><li>Reserved checkout: </li></ul></ul><ul><ul><ul><li>Default checkout </li></ul></ul></ul><ul><...
Checking out a File: ClearCase Explorer
Checking out a File: Windows Explorer
<ul><li>Usage: </li></ul><ul><li>Example: </li></ul>checkout | co [ -res/erved ] [-unr/eserved [ -nma/ ster ] ] [ -out des...
<ul><li>A directory namespace is a list of the names of file and subdirectory elements that the directory contains </li></...
Checking in a New Version <ul><li>Adds a new version to the version tree </li></ul><ul><li>Removes the read/write copy of ...
Resolving Checkouts 3 R 3 R U Reserved Unreserved 1 Check out 3 4 2 Check in 1 Check out 2 Check out 3 4 3 Check in 5 U 4 ...
What is a Version Tree? A hierarchical representation of an element in which all versions are logically organized. VOB 0 1...
Version-extended Names <ul><li>Each version of an element has a unique identifier  </li></ul><ul><li>The extended naming s...
<ul><li>Files that are not under ClearCase source control </li></ul><ul><li>Files that reside in the view; other users in ...
<ul><li>Branch type is a user-defined name that performs a unique pathname in the version tree  </li></ul><ul><li>Allows c...
Branch Type <ul><li>A user-defined name that forms a unique pathname in the version tree </li></ul><ul><li>Allows changes ...
Working on Branches <ul><li>When working on a project team, you will most likely work on element branches other than /main...
<ul><li>A default config spec is automatically set whenever you create a new view  </li></ul><ul><li>Rule 1: Select versio...
<ul><li>A view config spec can use  </li></ul><ul><li>the  –mkbranch  clause to create  </li></ul><ul><li>branches automat...
Version Tree with Updated Configspec Before checkout into view with the config spec using the auto  mkbranch  rule After c...
Typical Workflow: Merging <ul><li>Merge work </li></ul><ul><li>Merge work  to  </li></ul><ul><li>integration area </li></u...
<ul><li>Merging is the process by which ClearCase propagates changes from one branch to another </li></ul><ul><li>A merge ...
<ul><li>Every file in a VOB is associated with an element type </li></ul><ul><li>ClearCase uses element types to categoriz...
How ClearCase Merges Files and Directories Before Merge After Merge Base Contributor From Contributor Target (to) Contribu...
Integrating Parallel Development:  Merging Policies <ul><li>The goal of merging is to integrate parallel development </li>...
Merge Algebra A B C D E A (Deleted) C D R  (Changed) X  (Inserted) A B C Z  (Changed) Q  (Changed) A Deleted C Z  (Changed...
Types of Merges Merge tool prompts you to choose between merge contributors There are conflicting changes among the contri...
Merge Utilities <ul><li>In ClearCase, you can merge in one of three ways: </li></ul><ul><li>Version Tree Browser </li></ul...
Merging using Version Tree Browser Scenario:  For element  new doc  merge  v2  on  /main  with  v1  on  rel1_bugfix 1 Sele...
Merging using Version Tree Browser (cont.) 3 Select  Yes  to perform the merge. 4 Click  OK  to confirm the merge
Merging using Version Tree Browser (cont.) <ul><li>If there are no conflicting changes, the merge proceeds automatically <...
Merging with the Merge Manager <ul><li>The Merge Manager provides a graphical interface for locating files to be merged an...
Merging with the Merge Manager (cont.) 2 Select the view 3 Select the specific element you want to merge
Merging with the Merge Manager (cont.) 4 Choose a method for selecting the version of each element to merge Merge from LAT...
Merging with the Merge Manager (cont.) 5 Provide additional information needed for the merge, then click  Finish 6 Confirm...
Merging with the Merge Manager (cont.) 7 Click  Yes  to verify the merge elements 8 Click  OK  to start the merge
Merging with the Merge Manager (cont.) Base Contributor: The original version Contributor1: The version that you are deliv...
<ul><li>Usage: </li></ul><ul><li>merge  {  –out   output-pname  |  –to   contrib-&-result-pname  }  </li></ul><ul><ul><li>...
Other ClearCase tasks
Working with Elements <ul><li>Working with elements </li></ul><ul><ul><li>Adding files and directories to source control <...
Working with Views <ul><li>Working with Views </li></ul><ul><ul><li>Finding checkouts </li></ul></ul><ul><ul><li>Changing ...
Adding Files to Source Control <ul><li>As you work on a project, you may create  view-private   </li></ul><ul><li>files th...
Adding Directories to Source Control Add directories to the source control the same way you add individual files When you ...
Adding Many Files or Directories <ul><li>When you must add a number of files or directories to source control use  clearfs...
Comparing File and Directory Versions <ul><li>ClearCase allows you to compare element and directory versions </li></ul><ul...
Comparing Directory Versions The Compare tool enables you to view, side-by-side, the elements appearing in two versions of...
Moving an Element From ClearCase Explorer  only , drag and drop to move elements within a VOB <ul><li>CLI Procedure: </li>...
Removing References to an Element <ul><li>Remove the name of an element or VOB symbolic link from a directory list </li></...
Renaming an Element CLI Procedure To Remove Reference to an Element:   >cleartool rmname hello.c  To Rename an Element:   ...
Removing a Version <ul><li>When you remove a version, other versions before and after the removed version(s) remain access...
Removing an Element <ul><li>Removes an element COMPLETELY from the VOB; there is NO WAY to restore it </li></ul><ul><li>Re...
Viewing an Element History <ul><li>An element history is recorded in event records in the VOB </li></ul><ul><li>A ClearCas...
The lost+found Directory <ul><li>Found in every VOB at the highest directory level </li></ul><ul><li>Contains  orphaned  e...
<ul><li>ClearCase enables you to search for checkouts based on user-defined criteria. </li></ul>Finding Checkouts Based on...
<ul><li>Cancel a checkout when you do not want to save changes or want a fresh copy </li></ul><ul><li>You can rename and s...
<ul><li>Enable you to specify a version that may not be visible in your dynamic view </li></ul><ul><li>@@ ( extended-namin...
<ul><li>Views are temporary, task-related objects; once a specific development task or project is complete, remove the vie...
<ul><li>What is metadata? </li></ul><ul><li>Kinds of ClearCase metadata </li></ul><ul><li>Metadata uses </li></ul><ul><li>...
<ul><li>A set of constructions and annotations that attach to ClearCase objects </li></ul><ul><li>Allows you to organize, ...
<ul><li>Kinds </li></ul><ul><ul><li>Branches ■   Labels </li></ul></ul><ul><ul><li>Elements ■   Attributes </li></ul></ul>...
<ul><li>Structuring the Project: Elements and Branches </li></ul><ul><li>Elements </li></ul><ul><ul><li>Define elements st...
<ul><li>User-defined names that can be attached to versions </li></ul><ul><li>Uniquely identify a version </li></ul><ul><l...
<ul><li>Name and value pair </li></ul><ul><li>Can annotate any ClearCase object </li></ul><ul><li>Use to represent propert...
<ul><li>Triggers define actions to be performed in response to a ClearCase event </li></ul><ul><ul><li>Events  are ClearCa...
<ul><li>Pre-event triggers </li></ul><ul><ul><li>Performed before the event </li></ul></ul><ul><ul><li>Used to enforce pol...
<ul><li>A logical connection between any two VOB objects </li></ul><ul><li>Allow you to identify and preserve relationship...
Viewing Metadata Types: Type Explorer Start > Programs > Rational > ClearCase > Type Explorer Metadata types Metadata kinds
Applying a Label 1 In the  Version Tree Browser , select the version you want to label, and then click  Tools > Apply Labe...
Adding Attributes 1.  Click on  Custom  tab on the Properties sheet of the object to be annotated. 2 Click  Add Attribute ...
<ul><li>Hyperlinks can only be attached through the command line. </li></ul><ul><li>Use  cleartool mkhlink  to attach hype...
Integrating Parallel Development
Topics <ul><li>Branching </li></ul><ul><ul><li>Branching – review </li></ul></ul><ul><ul><li>Why branch? </li></ul></ul><u...
Branching - review <ul><li>Technique to isolate change and enable parallel development </li></ul><ul><li>Controls the publ...
Why Branch? <ul><li>When you </li></ul><ul><ul><li>Need project level parallel development of a comman base </li></ul></ul...
Types of Branches <ul><li>Integration branches </li></ul><ul><ul><li>/Main </li></ul></ul><ul><ul><li>Project branches </l...
Creating Branch Instances <ul><li>Branch type should exist </li></ul><ul><li>Use –mkbranch clause in the config spec </li>...
Multi-Level Auto-Branching Element * CHECKEDOUT Element * /main/r2_int/pat_r2/LATEST Element * /main/r2_int/LATEST –mkbran...
Merging an Unreserved Checkout <ul><li>You cannot check in an unreserved checkout if there are successor version </li></ul...
Selective Merge <ul><li>Selects changes from a specific versions from a branch to merge </li></ul><ul><li>Use the –insert ...
Selective Merge - Example 3 2 1 0 R 1 0 /r2_int /main /r1_bugfix 4 R1 Other bug fixes not  relevant to /r2_int Bug fix to ...
Subtractive Merge <ul><li>Removes changes made in one or more of its predecessors from a checked-out version </li></ul><ul...
Subtractive Merge - Example The multi-threaded algorithm  implemented in element  Versions 2 and 3 contains a fatal  Flaw....
Creating Reports <ul><li>Report on ClearCase objects and events using cleartool subcommands </li></ul><ul><li>Run reports ...
Cleartool sub commands <ul><li>Many ClearCase commands read data from a VOB, format it, and write to standard output </li>...
Cleartool : Annotate <ul><li>Provides line-by-line details about changes to versions of an element </li></ul><ul><li>Extra...
Cleartool : describe <ul><li>Lists info about VOB and VOB objects </li></ul><ul><ul><li>Descriptions of elements, versions...
Other commands <ul><li>Lshistory : lists events for VOB-database objects </li></ul><ul><li>Lsvtree : lists the events in t...
Any Queries ?
Thank You
Nächste SlideShare
Wird geladen in …5
×

ClearCase Basics

46.967 Aufrufe
46.474 Aufrufe

Veröffentlicht am

This presentation develops the basics for the ClearCase SCM tool.

Veröffentlicht in: Technologie
68 Kommentare
51 Gefällt mir
Statistik
Notizen
Keine Downloads
Aufrufe
Aufrufe insgesamt
46.967
Auf SlideShare
0
Aus Einbettungen
0
Anzahl an Einbettungen
283
Aktionen
Geteilt
0
Downloads
0
Kommentare
68
Gefällt mir
51
Einbettungen 0
Keine Einbettungen

Keine Notizen für die Folie
  • ClearCase Basics

    1. 1. ClearCase Fundamentals
    2. 2. Course Goals <ul><li>Introduce SCM </li></ul><ul><li>Demonstrate typical developer workflow </li></ul><ul><li>Identify other ClearCase tasks </li></ul><ul><li>Demonstrate parallel development </li></ul>
    3. 3. What this course does not cover? <ul><li>Complete implementation of software configuration management </li></ul><ul><li>Complete features of ClearCase tool </li></ul><ul><li>Administrator’s tasks </li></ul><ul><li>ClearCase MultiSite </li></ul>
    4. 4. Introduction to SCM
    5. 5. Software Configuration Management (SCM) SCM “ SCM is about managing change to software” Brian White , Software Configuration Management Strategies and Rational ClearCase (2000)
    6. 6. What is SCM? <ul><li>SCM is a software engineering discipline comprising the tools and techniques (processes or methodology) that a company uses to manage changes to its software assets. </li></ul><ul><li>SCM answers who, what, when and why </li></ul>
    7. 7. Why SCM? <ul><li>Multiple individuals work on software that is changing. </li></ul><ul><li>More than one version of the software has to be supported. </li></ul><ul><li>Decrease time to market </li></ul><ul><li>Control Cost </li></ul>
    8. 8. Why SCM? (Cont) <ul><li>A successful SCM effort ensures : </li></ul><ul><ul><li>Safety </li></ul></ul><ul><ul><li>Stability </li></ul></ul><ul><ul><li>Control </li></ul></ul><ul><ul><li>Auditability </li></ul></ul><ul><ul><li>Reporducibility </li></ul></ul><ul><ul><li>Traceability </li></ul></ul><ul><ul><li>Scalability </li></ul></ul>
    9. 9. SCM Tools <ul><li>ClearCase - Rational Software </li></ul><ul><li>Visual Source Safe - Microsoft </li></ul><ul><li>PVCS - Merant (previously Intersolv) </li></ul><ul><li>Continnus - Telelogic (acquired Continnus) </li></ul>
    10. 10. Introduction to Rational ClearCase Family
    11. 11. IBM Rational ClearCase family <ul><li>Provides software asset management </li></ul><ul><li>through features such as version control, </li></ul><ul><li>baseline management, and build </li></ul><ul><li>and release management </li></ul><ul><li>Consists of three key products: </li></ul><ul><ul><li>IBM Rational ClearCase LT </li></ul></ul><ul><ul><li>IBM Rational ClearCase </li></ul></ul><ul><ul><li>IBM Rational ClearCase MultiSite </li></ul></ul>
    12. 12. ClearCase family – At a glance
    13. 13. ClearCase LT
    14. 14. ClearCase
    15. 15. ClearCase MultiSite
    16. 16. Capabilities <ul><li>Manage change across the software life cycle—from design to code to test </li></ul><ul><li>Simplify development with activity-based change management </li></ul><ul><li>Improve team collaboration with out-of-the-box process automation and workflow management </li></ul><ul><li>Enable parallel development </li></ul>
    17. 17. Capabilities (cont) <ul><li>Support asset-based development for software reuse </li></ul><ul><li>Speed application delivery with advanced build and release management </li></ul><ul><li>Provide real-time project status </li></ul><ul><li>Support direct access to assets and changes from within leading integrated development environments (IDEs) </li></ul>
    18. 18. Capabilities (cont) <ul><li>Improve the ability to meet regulatory requirements with audit support </li></ul><ul><li>Scale from small workgroups to geographically distributed enterprises </li></ul>
    19. 19. ClearCase implements SCM <ul><li>Version control </li></ul><ul><ul><li>Version all types of files and directories </li></ul></ul><ul><li>Build Management </li></ul><ul><ul><li>Ensure the integrity of all software elements </li></ul></ul><ul><ul><li>Accurately reproduce every release </li></ul></ul><ul><ul><li>Trace and reproduce builds </li></ul></ul><ul><li>Workspace management </li></ul><ul><ul><li>Work in parallel with other developers </li></ul></ul><ul><li>Process control </li></ul><ul><ul><li>Record and report actions, history, and milestones </li></ul></ul><ul><ul><li>Customize process </li></ul></ul>
    20. 20. ClearCase Roles <ul><li>ClearCase developer </li></ul><ul><ul><li>Set up workspace </li></ul></ul><ul><ul><li>Make changes </li></ul></ul><ul><ul><li>Integrate changes </li></ul></ul><ul><ul><li>Update workspace </li></ul></ul><ul><li>ClearCase integrator </li></ul><ul><ul><li>Create integration workspace </li></ul></ul><ul><ul><li>Create Baseline </li></ul></ul><ul><ul><li>Build components </li></ul></ul>
    21. 21. ClearCase Roles (cont) <ul><li>ClearCase Configuration manager </li></ul><ul><ul><li>Write CM plan </li></ul></ul><ul><ul><li>Design development environment </li></ul></ul><ul><ul><li>Establish CM policies </li></ul></ul><ul><ul><li>Assign and schedule work </li></ul></ul><ul><ul><li>Monitor project status </li></ul></ul>
    22. 22. ClearCase Roles (cont) <ul><li>ClearCase administrator </li></ul><ul><ul><li>Setup hardware environment </li></ul></ul><ul><ul><li>Implement development environment </li></ul></ul><ul><ul><li>Maintain hardware and development environments </li></ul></ul>
    23. 23. Typical Developer Workflow
    24. 24. Typical Developer Workflow <ul><li>Set up workspace </li></ul><ul><li>Create a view </li></ul><ul><li>Start a view </li></ul><ul><li>Mount a VOB </li></ul><ul><li>Work on files </li></ul><ul><li>Configuration workspace </li></ul><ul><li>Checkout files </li></ul><ul><li>Edit files </li></ul><ul><li>Check in files </li></ul><ul><li>Merge work </li></ul><ul><li>Merge work to integration area </li></ul><ul><li>Merge from integration area </li></ul>
    25. 25. Typical Workflow: Setting Up Your Workspace <ul><li>Set up workspace </li></ul><ul><li>Create a view </li></ul><ul><li>Start a view </li></ul><ul><li>Mount a VOB </li></ul>
    26. 26. What is a Versioned Object Base (VOB)? <ul><li>A permanent, read-only data repository that: </li></ul><ul><ul><li>Stores files, directories, and metadata </li></ul></ul><ul><ul><li>Stores version-controlled data </li></ul></ul><ul><ul><li>Displays its contents as files in a file system </li></ul></ul><ul><ul><li>Stores anything that can be represented as file or directory </li></ul></ul><ul><ul><li>Can be replicated in two or more sites </li></ul></ul>VOB
    27. 27. VOB
    28. 28. Projects and VOBs <ul><li>A project can span more than one VOB </li></ul><ul><li>Multiple projects can share common VOBs </li></ul>Project 1 Project 2 VOB A VOB B VOB C
    29. 29. What is an Element? <ul><li>A file or directory, under source control, stored in a ClearCase VOB </li></ul><ul><li>Can be any object that can be stored in a native file system, including </li></ul><ul><ul><li>Source files </li></ul></ul><ul><ul><li>Directories </li></ul></ul><ul><ul><li>Binary files </li></ul></ul><ul><ul><li>Object libraries </li></ul></ul><ul><ul><li>Documents </li></ul></ul>
    30. 30. What is a Version? <ul><li>An element consists of a set of versions, organized into a version tree </li></ul><ul><li>Each version represents one version of a file under source control </li></ul><ul><li>Versions are displayed in a workspace or view </li></ul>Versions of element hello.c 0 1 2 3
    31. 31. What is a View? <ul><li>A ClearCase mechanism that allows users access to versions of elements in VOBs </li></ul><ul><li>An isolated workspace for a user or a group </li></ul><ul><li>Enables users to work in parallel </li></ul>VOB Hello.c Util.c Hello.c v.3 util.c v.2 0 1 2 3 0 1 2 3 View
    32. 32. What is a Configuration Specification? <ul><li>For each view, a set of ordered rules used to select at most one version of each element </li></ul><ul><li>Determine which versions of an element are visible in the new view </li></ul>VOB hello.c Util.c hello.c v.3 util.c v.2 Configuration Specification VIEW 0 1 2 3 0 1 2 3
    33. 33. Types of Views <ul><li>Dynamic views </li></ul><ul><ul><li>use the ClearCase multi version file system (MVFS) to provide immediate, transparent access to files and directories stored in VOBs </li></ul></ul><ul><ul><li>Connected to shared storage </li></ul></ul><ul><ul><li>Work on virtual copy of elements in the VOB (MVFS) </li></ul></ul><ul><ul><li>Dynamic – changes as new work is shared </li></ul></ul><ul><ul><li>Always up-to-date </li></ul></ul><ul><ul><li>Provides build auditing </li></ul></ul><ul><li>Snapshot views </li></ul><ul><ul><li>Copy files and directories from VOBs to a directory on your computer </li></ul></ul><ul><ul><li>Can work disconnected from shared storage </li></ul></ul><ul><ul><li>Work on local copy of elements in the VOB (native file system) </li></ul></ul><ul><ul><li>Static – user controls when work is shared </li></ul></ul><ul><ul><li>Must be updated manually </li></ul></ul><ul><ul><li>Provides optimal build performance </li></ul></ul>
    34. 34. Which Type of View Should I Use? <ul><ul><li>Dynamic </li></ul></ul><ul><ul><li>You want to access elements in repositories without copying them into your computer </li></ul></ul><ul><ul><li>You want to view to reflect changes made by other team members at all times </li></ul></ul><ul><ul><li>Your project uses build auditing </li></ul></ul><ul><ul><li>Snapshot </li></ul></ul><ul><ul><li>You are using Win 9X, Win ME, or ClearCase LT, which do not support dynamic views </li></ul></ul><ul><ul><li>You want to work disconnected from the network </li></ul></ul><ul><ul><li>You do not need build avoidance </li></ul></ul>
    35. 35. Structure of a Dynamic View VOB 0 1 2 Hello.c Util.c hello.c Read/write util.c Read-only Virtual File System View Storage hello.c Check out Configuration Specification 0 1 2 3
    36. 36. Structure of a Snapshot View VOB 0 1 2 hello.c util.c hello.c Read/write copy util.c Read-only copy Local File System Configuration Specification Check out 0 1 2 3
    37. 37. Shortcut Pane Folder Pane Details Pane Information Pane Intro to ClearCase Explorer
    38. 38. Creating a Dynamic View 1 Launch the View Creation Wizard Toolbox tab 2 Select Dynamic View
    39. 39. Creating a Dynamic View (Cont.) 3 Choose a view name (or view-tag) 4 Select a drive letter to which you want to connect the new view, or you can select {none} and work directly on the MVFS(M:) drive 5 Click Advanced Options 6 Accept the default or specify the location of the view storage directory 7 Click on Finish
    40. 40. Starting a View 1 Click Start View 2 Select the view you want to start, and then click OK <ul><li>Each view has a unique tag name </li></ul><ul><li>When you create a dynamic view, it starts automatically </li></ul>
    41. 41. Mounting a VOB for Dynamic Views <ul><li>The mount command activates a VOB for use on the local workstation </li></ul><ul><li>You access a VOB through its unique tag name </li></ul>
    42. 42. Typical Workflow: Work on Files <ul><li>Work on Files </li></ul><ul><li>Configure workspace </li></ul><ul><li>Check out files </li></ul><ul><li>Edit files </li></ul><ul><li>Check in files </li></ul>
    43. 43. Checkout / Checkin Model <ul><ul><li>When a file is under source control, you check it out to work on it </li></ul></ul><ul><ul><li>A file is checked out to a view and a modifiable copy is available to work on </li></ul></ul><ul><ul><li>A placeholder is created in the version </li></ul></ul><ul><ul><li>tree as the potential successor version </li></ul></ul><ul><ul><li>When you check in the file, </li></ul></ul><ul><ul><li>a new version is added to the </li></ul></ul><ul><ul><li>element version tree </li></ul></ul>2 3 R Placeholder
    44. 44. View before and after Checking out VOB 0 1 2 Hello.c Util.c hello.c Read/write util.c Read-only View display View Storage hello.c Check out Configuration Specification VOB 0 1 2 Hello.c Util.c hello.c Read-only util.c Read-only Configuration Specification View display Before checking out After checking out 0 1 2 3 0 1 2 3
    45. 45. Types of Checkout <ul><ul><li>Reserved checkout: </li></ul></ul><ul><ul><ul><li>Default checkout </li></ul></ul></ul><ul><ul><ul><li>Has exclusive rights to next place on version tree </li></ul></ul></ul><ul><ul><ul><li>No checkins can be made on the same branch until </li></ul></ul></ul><ul><ul><ul><li>the checkout is resolved </li></ul></ul></ul><ul><ul><ul><li>Only allowed if no other reserved checkouts exist </li></ul></ul></ul><ul><ul><ul><li>for the branch </li></ul></ul></ul><ul><ul><li>Unreserved checkout: </li></ul></ul><ul><ul><ul><li>Allowed regardless of the status of other checkouts </li></ul></ul></ul><ul><ul><ul><li>of the version </li></ul></ul></ul><ul><ul><ul><li>Before check in, must be merged or discarded if any </li></ul></ul></ul><ul><ul><ul><li>checkin has taken place </li></ul></ul></ul>3 R 3 R U
    46. 46. Checking out a File: ClearCase Explorer
    47. 47. Checking out a File: Windows Explorer
    48. 48. <ul><li>Usage: </li></ul><ul><li>Example: </li></ul>checkout | co [ -res/erved ] [-unr/eserved [ -nma/ ster ] ] [ -out dest-pname | -nda/ ta ] [ -pti/me ] [ -bra/nch branch-pname | -ver/sion ] [ -nwa/rn ] [ -c/omment comment | -cfi/le comment-file-pname | -cq/uery | -cqe/ach | -nc/omment ][ -q/uery | -nq/uery ] pname ... Checking out a File: Command Line Interface M: ags_view estsource>cleartool checkout file.txt Checkout comments for &quot;file.txt&quot;: . Checked out &quot;file.txt&quot; from version &quot;main9&quot;. (OR) M: ags_view estsource>cleartool cleartool> checkout -reserved -c &quot;command line checkout&quot; file.txt Checked out &quot;file.txt&quot; from version &quot;main9&quot;. You must end the comment by typing “ . ” and Enter
    49. 49. <ul><li>A directory namespace is a list of the names of file and subdirectory elements that the directory contains </li></ul><ul><li>Operations that change the directory namespace require a new directory version. These operations include </li></ul><ul><ul><ul><li>Adding a new file or directory elements </li></ul></ul></ul><ul><ul><ul><li>Renaming fie or directory elements </li></ul></ul></ul><ul><ul><ul><li>Removing elements </li></ul></ul></ul><ul><ul><ul><li>Moving file or directory elements </li></ul></ul></ul><ul><ul><ul><li>Adding or removing VOB links </li></ul></ul></ul><ul><li>The ClearCase GUI automatically checks out a directory and creates a new version if a change occurs to the directory namespace (some operations will prompt you to check out the directory) </li></ul><ul><li>Using the CLI, you must check out/check in a directory to create a new version </li></ul><ul><li>To change only file contents but not the directory namespace, you do not need to check out the directory </li></ul>Version Directories
    50. 50. Checking in a New Version <ul><li>Adds a new version to the version tree </li></ul><ul><li>Removes the read/write copy of the file from the view storage area </li></ul><ul><li>The checked in version becomes available to users using dynamic views and to the snapshot view users upon the next update </li></ul><ul><li>Checking in Using CLI </li></ul><ul><li>Usage: </li></ul><ul><li>checkin | ci [-c comment | -nc] [-identical] pname… </li></ul><ul><li>Example: </li></ul><ul><li>M: ags_view estsourceNewFolder>cleartool ci -c &quot;minor enhancements&quot; nag.c </li></ul><ul><li>Checked in &quot;nag.c&quot; version &quot;main2&quot;. </li></ul>
    51. 51. Resolving Checkouts 3 R 3 R U Reserved Unreserved 1 Check out 3 4 2 Check in 1 Check out 2 Check out 3 4 3 Check in 5 U 4 Merge 5 Check in
    52. 52. What is a Version Tree? A hierarchical representation of an element in which all versions are logically organized. VOB 0 1 2 3 hello.c /main Element Name Branches R1 Label 0 1 2 /r2_int Versions
    53. 53. Version-extended Names <ul><li>Each version of an element has a unique identifier </li></ul><ul><li>The extended naming symbol denotes a path into the version tree of an element </li></ul><ul><li>@@ is the default extended naming symbol </li></ul>VOB 0 1 2 3 hello.c /main R1 0 1 2 /r2_int hello.c@@/main/r2_int/1 Version selected by your view
    54. 54. <ul><li>Files that are not under ClearCase source control </li></ul><ul><li>Files that reside in the view; other users in other views do not see them </li></ul><ul><li>Examples: </li></ul><ul><ul><li>Temporary files created during development or testing </li></ul></ul><ul><ul><li>Files not yet added to source control </li></ul></ul><ul><ul><li>Read/write copies of files checked out of source control </li></ul></ul>What are View-private Files?
    55. 55. <ul><li>Branch type is a user-defined name that performs a unique pathname in the version tree </li></ul><ul><li>Allows changes across multiple elements to be logically grouped together </li></ul><ul><li>Allows different projects to use the same source at the same time </li></ul><ul><li>Controls public/private work </li></ul><ul><li>Isolates changes </li></ul><ul><ul><li>Temporary, such as new features </li></ul></ul><ul><ul><li>that have not yet been tested </li></ul></ul><ul><ul><li>Permanent, such as fixing a bug </li></ul></ul><ul><ul><li>in a retired release </li></ul></ul><ul><li>Prevents roadblocks – development can proceed during an integration period </li></ul>Branching Enables Parallel Development hello.c /main R1 /r1_fix /r2_int /nag_r2 /chris_r2
    56. 56. Branch Type <ul><li>A user-defined name that forms a unique pathname in the version tree </li></ul><ul><li>Allows changes across multiple elements to be logically grouped together </li></ul><ul><li>Centralizes administrative control of branch names </li></ul>Main branch Integration branch Hello.c /main Util.c /main /r2_int /r2_int Using branch types unsures Consistent Tree structures
    57. 57. Working on Branches <ul><li>When working on a project team, you will most likely work on element branches other than /main </li></ul><ul><li>A view config spec specifies which versions of the element appear in the view </li></ul><ul><li>Edit our view config spec to select the correct branches and the correct versions </li></ul>
    58. 58. <ul><li>A default config spec is automatically set whenever you create a new view </li></ul><ul><li>Rule 1: Select version of elements checked out to THIS view </li></ul><ul><li>Rule 2: If no version is checked out, select the latest version on /main </li></ul>The Default View Config Spec Rule 1 Rule 2 Default Configuration Specification
    59. 59. <ul><li>A view config spec can use </li></ul><ul><li>the –mkbranch clause to create </li></ul><ul><li>branches automatically upon checkout: </li></ul><ul><li>Rule 3 is interpreted as: </li></ul><ul><ul><li>Select the version of the element with the R1 label </li></ul></ul><ul><ul><li>During checkout, automatically create the rel1_bugfix branch from the version labeled R1 </li></ul></ul><ul><ul><li>Check out the 0 (zero) version on the rel1_bugfix branch </li></ul></ul>Editing a Config Spec to Create Branches
    60. 60. Version Tree with Updated Configspec Before checkout into view with the config spec using the auto mkbranch rule After checkout; notice that checkout created the rel1_bugfix branch
    61. 61. Typical Workflow: Merging <ul><li>Merge work </li></ul><ul><li>Merge work to </li></ul><ul><li>integration area </li></ul><ul><li>Merge work from </li></ul><ul><li>integration area </li></ul>
    62. 62. <ul><li>Merging is the process by which ClearCase propagates changes from one branch to another </li></ul><ul><li>A merge combines the contents of two or more files or directories into a new version of a file or directory </li></ul><ul><li>After a merge, development can continue on both branches </li></ul><ul><li>Future merges have no restriction </li></ul><ul><li>in either frequency or direction </li></ul><ul><li>ClearCase includes automated merge </li></ul><ul><li>facilities for handling most merge scenarios </li></ul>Merging Overview 0 hello.c /main 1 2 3 0 1 2 /r2_int
    63. 63. <ul><li>Every file in a VOB is associated with an element type </li></ul><ul><li>ClearCase uses element types to categorize and manage elements </li></ul><ul><li>Not all ClearCase element types can be merged </li></ul>Element Types and Merging CAN be merged CANNOT be merged directory binary delta file html compressed file ms word file rose xml text file compressed text file xde
    64. 64. How ClearCase Merges Files and Directories Before Merge After Merge Base Contributor From Contributor Target (to) Contributor Merge Result
    65. 65. Integrating Parallel Development: Merging Policies <ul><li>The goal of merging is to integrate parallel development </li></ul><ul><li>Each organization should define a merging strategy that works in their environment and which answers: </li></ul><ul><ul><li>When do we merge? </li></ul></ul><ul><ul><li>How do we merge? </li></ul></ul><ul><ul><li>Who performs merges? </li></ul></ul><ul><ul><li>How often do we merge? </li></ul></ul><ul><li>Merging is two way </li></ul><ul><ul><li>Merge from main branch to bugfix branch, then merge from bugfix branch to main branch </li></ul></ul><ul><ul><li>Merge from bugfix branch to main branch, then merge from main branch to bugfix branch </li></ul></ul>
    66. 66. Merge Algebra A B C D E A (Deleted) C D R (Changed) X (Inserted) A B C Z (Changed) Q (Changed) A Deleted C Z (Changed) ? (Conflict) X (Inserted) Start Diff Merge Tool Base contributor version “ From” contributor version “ To” contributor version Merge Result
    67. 67. Types of Merges Merge tool prompts you to choose between merge contributors There are conflicting changes among the contributors Manual Automatic merge There are changes, but no conflicting merge points Automatic Non-trivial Merge result contains changes from the “from” contributor Base and Target contributor contain the same data from the “from” contributor Trivial Result Changes Type of merge
    68. 68. Merge Utilities <ul><li>In ClearCase, you can merge in one of three ways: </li></ul><ul><li>Version Tree Browser </li></ul><ul><li>Merge Manager </li></ul><ul><li>Command line interface </li></ul>
    69. 69. Merging using Version Tree Browser Scenario: For element new doc merge v2 on /main with v1 on rel1_bugfix 1 Select the “from” version and then click Tools > Merge to 2 When the cursor changes to resemble a target, click the “to” version
    70. 70. Merging using Version Tree Browser (cont.) 3 Select Yes to perform the merge. 4 Click OK to confirm the merge
    71. 71. Merging using Version Tree Browser (cont.) <ul><li>If there are no conflicting changes, the merge proceeds automatically </li></ul><ul><li>As a result of the merge, ClearCase: </li></ul><ul><ul><li>Copies the checked out file to file.contrib </li></ul></ul><ul><ul><li>Places the results of the merge in the checked-out version of the file </li></ul></ul><ul><ul><li>Records the merge in the VOB database </li></ul></ul>5 Check in the file to complete the merge
    72. 72. Merging with the Merge Manager <ul><li>The Merge Manager provides a graphical interface for locating files to be merged and for performing the merge </li></ul><ul><li>Start > Programs > Rational > ClearCase > Merge Manager </li></ul>1 Click on New
    73. 73. Merging with the Merge Manager (cont.) 2 Select the view 3 Select the specific element you want to merge
    74. 74. Merging with the Merge Manager (cont.) 4 Choose a method for selecting the version of each element to merge Merge from LATEST element on a selected branch Merge from element according to a specified label Use a ClearCase query language statement to select the “from” versions Merge elements selected by a particular view
    75. 75. Merging with the Merge Manager (cont.) 5 Provide additional information needed for the merge, then click Finish 6 Confirm the merge criteria, then click Find
    76. 76. Merging with the Merge Manager (cont.) 7 Click Yes to verify the merge elements 8 Click OK to start the merge
    77. 77. Merging with the Merge Manager (cont.) Base Contributor: The original version Contributor1: The version that you are delivering FROM Contributor2: The version that you are delivering TO Merge results pane Navigation Buttons: Use to move between merge points Merge Buttons: Click to move changes from the first, second, or third contributor pane to the merge results pane.
    78. 78. <ul><li>Usage: </li></ul><ul><li>merge { –out output-pname | –to contrib-&-result-pname } </li></ul><ul><ul><li>[ –g·raphical [ –tin·y ] | [ –ser·ial_format | –dif·f_format | –col·umns n ] ] [ –bas·e pname | –ins·ert | –del·ete ] [ –nda·ta | –nar·rows ] [ –rep·lace ] [ –q·uery | –abo·rt | –qal·l ] [ –c·omment comment | –cfi·le comment-file-pname | –cq·uery | –cqe·ach | –nc·omment ] [ –opt·ions pass-through-options ] { –ver·sion contrib-version-selector ... | contrib-pname ... } </li></ul></ul><ul><li>Examples: </li></ul><ul><ul><li>Merge the version of file util.c in the current view with the most recent versions on the rel2_bugfix and test branches; suppress the creation of merge arrows. </li></ul></ul><ul><ul><li>cleartool>   merge –to util.c –narrows  –version /main/rel2_bugfix/LATEST /main/test/LATEST </li></ul></ul><ul><ul><li>Merge the version of file util.c , in view jk_fix , to version 3 on the main branch, placing the merged output in a temporary file. </li></ul></ul><ul><ul><li>cleartool> merge –out  mpproj.out util.c@@main3 jk_fixusers_hwsrcutil.c   </li></ul></ul><ul><ul><li>Merge the version of file util.c to version 3 on the main branch, placing the merged output in a temporary file. cmd- </li></ul></ul><ul><ul><li>cleartool> merge –abort –out /tmp/proj.out util.c@@/main/3 util.c   </li></ul></ul><ul><ul><li>Subtractive merge: remove the changes made in version 3 from file util.c . </li></ul></ul><ul><ul><li>cleartool> merge –to util.c –abort –delete –version util.c@@main3   </li></ul></ul>Merging from Command Line
    79. 79. Other ClearCase tasks
    80. 80. Working with Elements <ul><li>Working with elements </li></ul><ul><ul><li>Adding files and directories to source control </li></ul></ul><ul><ul><li>Comparing versions of elements </li></ul></ul><ul><ul><li>Moving, renaming, and removing elements and versions </li></ul></ul><ul><ul><li>Viewing an element history </li></ul></ul><ul><ul><li>The lost+found directory </li></ul></ul>
    81. 81. Working with Views <ul><li>Working with Views </li></ul><ul><ul><li>Finding checkouts </li></ul></ul><ul><ul><li>Changing a checkout status </li></ul></ul><ul><ul><li>Cancelling a checkout </li></ul></ul><ul><ul><li>Specifying versions using version-extended names </li></ul></ul><ul><ul><li>Removing a view </li></ul></ul>
    82. 82. Adding Files to Source Control <ul><li>As you work on a project, you may create view-private </li></ul><ul><li>files that you want to add to source control </li></ul><ul><li>You can add Files and Directories </li></ul><ul><li>Add files to source control </li></ul><ul><ul><li>GUI – Add to Source Control </li></ul></ul><ul><ul><li>Command Line – mkelem </li></ul></ul><ul><ul><li>Utility – clearfsimport </li></ul></ul><ul><li>When you add a file to source control, ClearCase: </li></ul><ul><ul><li>Determines the file type </li></ul></ul><ul><ul><li>Creates an element </li></ul></ul><ul><ul><li>Creates the /main branch and an empty version 0 </li></ul></ul><ul><ul><li>By default, checks in the element and creates version 1 </li></ul></ul>
    83. 83. Adding Directories to Source Control Add directories to the source control the same way you add individual files When you add a directory to source control, files within the directory remain view-private
    84. 84. Adding Many Files or Directories <ul><li>When you must add a number of files or directories to source control use clearfsimport </li></ul><ul><li>clearfsimport is a command-line utility that converts file system directories and files to ClearCase elements </li></ul><ul><li>clearfsimport creates new elements or add new versions to existing elements </li></ul><ul><li>NOTE: You must be the VOB Owner to run clearfsimport </li></ul><ul><li>Usage: </li></ul><ul><li>clearfsimport [-downcase] [-recurse] [-rmname] </li></ul><ul><li>[-mklabel label] [-nsetevent] </li></ul><ul><li>[-identical] [-master] [-comment comment ] </li></ul><ul><li>[-unco] [-preview] source-name ... target-VOB-directory </li></ul><ul><li>Example: </li></ul><ul><li>To import the contents of C:src into the source directory of test VOB </li></ul><ul><li>C:> clearfsimport –recurse C:src M: ags_view2 testsource </li></ul>
    85. 85. Comparing File and Directory Versions <ul><li>ClearCase allows you to compare element and directory versions </li></ul><ul><li>Can compare a version with a predecessor or with any other previous version in the tree </li></ul><ul><li>In GUI, invokes graphical Compare tool that compares contents of files and directories </li></ul>
    86. 86. Comparing Directory Versions The Compare tool enables you to view, side-by-side, the elements appearing in two versions of a directory. CLI Procedure for File Comparison and Directory Comparison
    87. 87. Moving an Element From ClearCase Explorer only , drag and drop to move elements within a VOB <ul><li>CLI Procedure: </li></ul><ul><li>Use the cleartool mv command to move an element from one VOB directory to another. </li></ul><ul><li>Use cleartool relocate to move an element between VOBs. </li></ul>
    88. 88. Removing References to an Element <ul><li>Remove the name of an element or VOB symbolic link from a directory list </li></ul><ul><li>The element still exists in the VOB </li></ul><ul><li>Moving or removing elements creates new versions of the parent directories </li></ul>
    89. 89. Renaming an Element CLI Procedure To Remove Reference to an Element: >cleartool rmname hello.c To Rename an Element: >cleartool move hello.c hello1.c
    90. 90. Removing a Version <ul><li>When you remove a version, other versions before and after the removed version(s) remain accessible. </li></ul><ul><li>If removing a non-text file element version, the data container is deleted </li></ul><ul><li>If removing a text file element version, ClearCase logically removes the version from the data container. No disk space is recovered. </li></ul><ul><li>The version-ID of a deleted version is never used. </li></ul><ul><li>You CAN NOT delete a version from which there is currently a checkout </li></ul><ul><li>Subsequent reference to a removed version produce an error </li></ul>
    91. 91. Removing an Element <ul><li>Removes an element COMPLETELY from the VOB; there is NO WAY to restore it </li></ul><ul><li>Removes all references to it in ALL directory lists </li></ul><ul><li>You can not remove elements that have checked-out versions </li></ul><ul><li>To remove an element/version, you must be the element owner, VOB owner, or have ClearCase administrative rights </li></ul><ul><li>CLI Procedure: </li></ul><ul><li>Remove a Version: </li></ul><ul><li>> cleartool rmver new.doc@@main el1_bugfix 1 </li></ul><ul><li>Remove an Element: </li></ul><ul><li>> cleartool rmelem util.c </li></ul>
    92. 92. Viewing an Element History <ul><li>An element history is recorded in event records in the VOB </li></ul><ul><li>A ClearCase operation, such as checkout, causes an event record to be created </li></ul><ul><li>Event records include: who, what, when, where and comments associated with the event </li></ul><ul><li>Events that change the content of elements are considered major, while other events are considered minor </li></ul>
    93. 93. The lost+found Directory <ul><li>Found in every VOB at the highest directory level </li></ul><ul><li>Contains orphaned elements, which are elements that are no longer catalogued in any version of any directory </li></ul><ul><li>Elements can become orphaned if a user: </li></ul><ul><ul><li>Cancels a checkout of a directory after adding a new element – it removes the directory element, but not the file elements created in it. </li></ul></ul><ul><ul><li>Removes a directory element without removing the file elements within the directory </li></ul></ul>
    94. 94. <ul><li>ClearCase enables you to search for checkouts based on user-defined criteria. </li></ul>Finding Checkouts Based on selection criteria, ClearCase displays a list of the checked out files in the Find Checkouts window.
    95. 95. <ul><li>Cancel a checkout when you do not want to save changes or want a fresh copy </li></ul><ul><li>You can rename and save a view-private version of the file : filename.keep . If you do not save the file, all changes are lost </li></ul><ul><li>You can cancel a checkout from Find Checkouts window </li></ul><ul><li>Once you undo a checkout, your view selects the predecessor version </li></ul>Cancelling a Checkout
    96. 96. <ul><li>Enable you to specify a version that may not be visible in your dynamic view </li></ul><ul><li>@@ ( extended-naming symbol ) denotes a path into the version tree of an element </li></ul><ul><ul><li>Specify integer versions </li></ul></ul><ul><ul><ul><li>hello.c@@main el1_bugfix9 </li></ul></ul></ul><ul><ul><li>User-defined version labels </li></ul></ul><ul><ul><ul><li>util.c@@REL1.0 </li></ul></ul></ul><ul><li>Using a standard name, you access the version of the file that your dynamic view selects: </li></ul><ul><ul><ul><li>type hello.c </li></ul></ul></ul><ul><li>To see a version other than the one selected by your dynamic view, use a version-extended pathname: </li></ul><ul><ul><ul><li>type hello.c@@main el1_bugfix2 </li></ul></ul></ul>Selecting a Version Other Than Those in Your View
    97. 97. <ul><li>Views are temporary, task-related objects; once a specific development task or project is complete, remove the view </li></ul><ul><li>Before removing a view, add all important view-private files to source control or copy them to another location </li></ul><ul><li>Removing the view will: </li></ul><ul><ul><li>Clean up VOB references to the view </li></ul></ul><ul><ul><li>Remove the view storage directory </li></ul></ul><ul><ul><li>Remove the view tag and unregister the view </li></ul></ul><ul><ul><li>Stop view server processes </li></ul></ul><ul><li>DO NOT use Windows Utilities to remove a view storage directory </li></ul>Removing a View
    98. 98. <ul><li>What is metadata? </li></ul><ul><li>Kinds of ClearCase metadata </li></ul><ul><li>Metadata uses </li></ul><ul><li>Applying metadata (Use labels, attribute, and hyperlinks) </li></ul>ClearCase Metadata
    99. 99. <ul><li>A set of constructions and annotations that attach to ClearCase objects </li></ul><ul><li>Allows you to organize, manipulate, and manage those objects </li></ul><ul><li>Enables you to </li></ul><ul><ul><li>Find, list, sort, and retrieve information </li></ul></ul><ul><ul><li>Access work faster and more directly </li></ul></ul><ul><ul><li>Organize tasks </li></ul></ul><ul><ul><li>Manage how development tasks are performed </li></ul></ul><ul><ul><li>Capture information beyond what ClearCase captures by default </li></ul></ul><ul><ul><li>Enforce policies </li></ul></ul>What is metadata?
    100. 100. <ul><li>Kinds </li></ul><ul><ul><li>Branches ■ Labels </li></ul></ul><ul><ul><li>Elements ■ Attributes </li></ul></ul><ul><ul><li>Triggers ■ Hyperlinks </li></ul></ul><ul><li>Types </li></ul><ul><ul><li>Specific definitions of the kind dedicated to particular uses </li></ul></ul><ul><li>Instances </li></ul><ul><ul><li>One example of a given type applied to one or more ClearCase objects </li></ul></ul><ul><li>ClearCase metadata kinds share an implementation scheme: </li></ul><ul><ul><li>Create the metadata type </li></ul></ul><ul><ul><li>Create an instance of that type </li></ul></ul>Kinds of Metadata Kind : branch Type : rel1_bugfix Instance: hello.c@@/main/rel1_bugfix
    101. 101. <ul><li>Structuring the Project: Elements and Branches </li></ul><ul><li>Elements </li></ul><ul><ul><li>Define elements storage and retrieval characteristics </li></ul></ul><ul><ul><li>May be used to group elements for special handling </li></ul></ul><ul><li>Branches </li></ul><ul><ul><li>Provides areas for task isolation and integration </li></ul></ul><ul><li>Annotating the Project: Labels and Attributes </li></ul><ul><li>Describe significant milestones, status flag, and tasks: </li></ul><ul><ul><li>Branch points </li></ul></ul><ul><ul><li>Build Configurations </li></ul></ul><ul><ul><li>Baselines </li></ul></ul><ul><ul><li>Status messages </li></ul></ul><ul><li>Identify starting points for future projects </li></ul><ul><li>Identify release configurations </li></ul>Metadata Uses
    102. 102. <ul><li>User-defined names that can be attached to versions </li></ul><ul><li>Uniquely identify a version </li></ul><ul><li>Identify a significant task or project milestone </li></ul><ul><li>Typically static </li></ul>Using Labels
    103. 103. <ul><li>Name and value pair </li></ul><ul><li>Can annotate any ClearCase object </li></ul><ul><li>Use to represent properties that can have many possible values </li></ul><ul><li>Example: BugNum = 22, 43, 54 </li></ul><ul><li>Use to represent properties that change overtime </li></ul><ul><li>Example: tested=“no”, “ready”, “yes”, “passed”, “failed” </li></ul>Using Attributes hello.c /main R2.1 /r2.1_bugfix BugNum = 22 tested=“failed” BugNum = 54 tested=“passed”
    104. 104. <ul><li>Triggers define actions to be performed in response to a ClearCase event </li></ul><ul><ul><li>Events are ClearCase operations that modify a VOB element including check out and check in </li></ul></ul><ul><ul><li>Actions include launching batch files, executables, or another ClearCase operation </li></ul></ul><ul><li>Triggers are local to a single VOB </li></ul><ul><li>Triggers support project policy implementation. Project policies are rules that: </li></ul><ul><ul><li>Enforce project methodology </li></ul></ul><ul><ul><li>Automate routine operations </li></ul></ul><ul><ul><li>Enforce site development policies </li></ul></ul>Managing Project Policies: Triggers
    105. 105. <ul><li>Pre-event triggers </li></ul><ul><ul><li>Performed before the event </li></ul></ul><ul><ul><li>Used to enforce policies </li></ul></ul><ul><ul><li>Ex: A trigger that prevents anyone but project leads from declaring branch types </li></ul></ul><ul><li>Post-event triggers </li></ul><ul><ul><li>Performed after a successful event </li></ul></ul><ul><ul><li>Used to provide information or initiate further actions </li></ul></ul><ul><ul><li>Ex: A trigger that attaches an attribute with a particular bug fix number to a version upon check in </li></ul></ul>Managing Project Policies: Triggers (cont.)
    106. 106. <ul><li>A logical connection between any two VOB objects </li></ul><ul><li>Allow you to identify and preserve relationships between VOB objects </li></ul><ul><li>Can show a relationship between objects in different VOBs </li></ul><ul><li>Can show a relationship between objects in different VOBs </li></ul><ul><li>Automatically created by merge operation </li></ul>Showing Project Relationships: Hyperlinks
    107. 107. Viewing Metadata Types: Type Explorer Start > Programs > Rational > ClearCase > Type Explorer Metadata types Metadata kinds
    108. 108. 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
    109. 109. Adding Attributes 1. Click on 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
    110. 110. <ul><li>Hyperlinks can only be attached through the command line. </li></ul><ul><li>Use cleartool mkhlink to attach hyperlinks to VOB objects </li></ul><ul><li>Example : </li></ul><ul><li>Create a hyperlink of type design_spec connecting the versions of a source file and design document labeled REL2. </li></ul><ul><li>>cleartool mkhlink design_spec util.c@@REL2 users_hwdocutil.doc@@REL2  </li></ul><ul><li>Created hyperlink &quot;design_spec@685@users_hw&quot;. </li></ul>Attaching Hyperlinks
    111. 111. Integrating Parallel Development
    112. 112. Topics <ul><li>Branching </li></ul><ul><ul><li>Branching – review </li></ul></ul><ul><ul><li>Why branch? </li></ul></ul><ul><ul><li>Types of branches </li></ul></ul><ul><ul><li>Instantiating branch types </li></ul></ul><ul><li>Merging </li></ul><ul><ul><li>Performing special types of merges </li></ul></ul><ul><ul><ul><li>Unreserved Checkout </li></ul></ul></ul><ul><ul><ul><li>Selective merge </li></ul></ul></ul><ul><ul><ul><li>Subtractive merge </li></ul></ul></ul>
    113. 113. Branching - review <ul><li>Technique to isolate change and enable parallel development </li></ul><ul><li>Controls the public and private nature of work </li></ul><ul><li>Typically parallel branches are eventually merged into a resulting product </li></ul><ul><li>CM,CA, or PL defines the organization branching and merging policies </li></ul>
    114. 114. Why Branch? <ul><li>When you </li></ul><ul><ul><li>Need project level parallel development of a comman base </li></ul></ul><ul><ul><li>Want to isolate aspects of the product’s evolution </li></ul></ul><ul><ul><li>Work on a long-range task and want to save and baseline your work (private branches) </li></ul></ul><ul><ul><li>Are working on a new feature and don’t want to have an impact on other developers </li></ul></ul><ul><ul><li>Need to organize your work by location for use with ClearCase Multisite </li></ul></ul>
    115. 115. Types of Branches <ul><li>Integration branches </li></ul><ul><ul><li>/Main </li></ul></ul><ul><ul><li>Project branches </li></ul></ul><ul><ul><li>Release branches </li></ul></ul><ul><ul><li>Feature branches </li></ul></ul><ul><li>Maintenance branches </li></ul><ul><li>Developer branches </li></ul><ul><li>MultiSite branches </li></ul>
    116. 116. Creating Branch Instances <ul><li>Branch type should exist </li></ul><ul><li>Use –mkbranch clause in the config spec </li></ul>
    117. 117. Multi-Level Auto-Branching Element * CHECKEDOUT Element * /main/r2_int/pat_r2/LATEST Element * /main/r2_int/LATEST –mkbranch pat_r2 Element * R1 –mkbranch r2_int Rule 1: Rule 2: Rule 3: Rule 4: /main 0 1 /main 1 0 /pat_r2 /r2_int 0 C 0 File before checkout File after checkout
    118. 118. Merging an Unreserved Checkout <ul><li>You cannot check in an unreserved checkout if there are successor version </li></ul><ul><li>The unreserved checkout must be merged with LATEST before you can check in </li></ul>
    119. 119. Selective Merge <ul><li>Selects changes from a specific versions from a branch to merge </li></ul><ul><li>Use the –insert option with merge command </li></ul><ul><li>No merge arrow in version tree browser </li></ul>
    120. 120. Selective Merge - Example 3 2 1 0 R 1 0 /r2_int /main /r1_bugfix 4 R1 Other bug fixes not relevant to /r2_int Bug fix to deliver to /r2_int via selective merge Bug fixe not relevant to /r2_int
    121. 121. Subtractive Merge <ul><li>Removes changes made in one or more of its predecessors from a checked-out version </li></ul><ul><li>The –delete option indicates the version or range of versions to subtract </li></ul><ul><li>No merge arrow in Version Tree Browser </li></ul>
    122. 122. Subtractive Merge - Example The multi-threaded algorithm implemented in element Versions 2 and 3 contains a fatal Flaw. /main 3 2 1 0 4 R Initial Code Faulty code Back out only these changes Cleartool merge –to hello.c – delete –version main 2_intpat_r22 main 2_intpat_r23
    123. 123. Creating Reports <ul><li>Report on ClearCase objects and events using cleartool subcommands </li></ul><ul><li>Run reports using the ClearCase Report Builder </li></ul>
    124. 124. Cleartool sub commands <ul><li>Many ClearCase commands read data from a VOB, format it, and write to standard output </li></ul><ul><li>Scope of reports can be </li></ul><ul><ul><li>Single Element </li></ul></ul><ul><ul><li>Set of objects </li></ul></ul><ul><ul><li>Entire VOB </li></ul></ul>
    125. 125. Cleartool : Annotate <ul><li>Provides line-by-line details about changes to versions of an element </li></ul><ul><li>Extracts information from element versions </li></ul><ul><li>By default, writes its output to an .ann file </li></ul>
    126. 126. Cleartool : describe <ul><li>Lists info about VOB and VOB objects </li></ul><ul><ul><li>Descriptions of elements, versions, or other objects </li></ul></ul><ul><ul><li>Labels attached to a particular version </li></ul></ul><ul><ul><li>Hyperlinks and/or attributes attached to objects </li></ul></ul><ul><ul><li>Predecessor versions of a particular version </li></ul></ul>
    127. 127. Other commands <ul><li>Lshistory : lists events for VOB-database objects </li></ul><ul><li>Lsvtree : lists the events in tree like structure </li></ul>
    128. 128. Any Queries ?
    129. 129. Thank You

    ×