5. Software Configuration Management (SCM) SCM “ SCM is about managing change to software” Brian White , Software Configuration Management Strategies and Rational ClearCase (2000)
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. 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. Shortcut Pane Folder Pane Details Pane Information Pane Intro to ClearCase Explorer
38. Creating a Dynamic View 1 Launch the View Creation Wizard Toolbox tab 2 Select Dynamic View
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.
41.
42.
43.
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
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. 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.
54.
55.
56.
57.
58.
59.
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.
62.
63.
64. How ClearCase Merges Files and Directories Before Merge After Merge Base Contributor From Contributor Target (to) Contributor Merge Result
65.
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. 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.
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. Merging using Version Tree Browser (cont.) 3 Select Yes to perform the merge. 4 Click OK to confirm the merge
71.
72.
73. Merging with the Merge Manager (cont.) 2 Select the view 3 Select the specific element you want to merge
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. 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. Merging with the Merge Manager (cont.) 7 Click Yes to verify the merge elements 8 Click OK to start the merge
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.
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.
85.
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.
88.
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.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107. Viewing Metadata Types: Type Explorer Start > Programs > Rational > ClearCase > Type Explorer Metadata types Metadata kinds
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. 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
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.
119.
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.
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 ain2_intat_r2 ain2_intat_r2