![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Using Configuration Management and Version Control This module describes the Configuration Management and Version Control (Summit/CM) system. A file's development is tracked by saving a version of the file every time it is checked into the Summit/CM database.
Prerequisite for this Module
Topics in this Module
- The Purpose of Summit/CM
- Checking Objects In and Out
- Controlling Objects
- Displaying Summit/CM Attributes and Check Out
- Abandoning Changes
- Checking Out, Modifying, and Checking In
Average Time to Complete this Module
The Purpose of Summit/CMPlacing a file under version control tracks the file's development in the Configuration Management and Version Control (Summit/CM) database by saving different versions of the file as it is developed. Making files controlled allows multiple developers to easily develop and have visibility to the same set of files, each of which may be under different stages of development.
Checking Objects In and OutBy default, controlled objects are not modifiable, although you can compile against controlled objects. To make a controlled object modifiable, you must check out the object using the Control > Check Out command. Checking out an object from the Summit/CM database has these important effects:
- it creates a working version of the file whose contents match the latest version in the Summit/CM database
- the working version of the file becomes writable by you and others in the group
Once you have checked out an object, you can make changes to it, save it, and make more changes. None of these changes are reflected by the Summit/CM database until you check the object in, using the Control > Check In command. Checking in an object has the following effects:
- adds a new version of the file to the Summit/CM database that matches the current contents of the file
- makes the file read-only
![]()
Version Histories
Each time you check out, modify, and check in an object you add a new version of the object to the Summit/CM database. This sequence of versions is called a version history. Each version represents a snapshot of the object at some moment in time. For example, Object A pictured below has three versions, each one containing an image of the object as it appeared at the time it was checked in. You can visit any version in an object's version history.
![]()
The Online Reference contains additional information version histories.
Version History Families
Within the Summit/CM database is a directory that stores the version histories for each controlled object. By default, this directory is called Common. You can create and name other directories within the database in order to group similar objects. This is useful for performing operations on all the version histories you have grouped in a particular directory. Because they group the version histories of several controlled objects, each directory is called a version history family. When you control an object, you associate it with a particular version history family. Objects associated with the same version history family are said to share the same history.
History Fields and History Icons
Version history families are often referred to simply as histories. In a dialog box, when you see a field with a name that includes the word History, the field's label refers to the file's version history family, not its individual sequence of versions.
Controlling ObjectsYou will use the file, text.txt, which you created in the "Creating a Text File (Apex/Summit)" module, in this exercise.
If you are not using an Apex compiler, follow the instructions to create these files using your own compiler/editor.
The steps below instruct you to place the file text.txt under version control. Next, you will check out the object, modify the program to produce different output, and check the file back in.
- 1. . Select (highlight) text.txt in the directory viewer of $HOME/project1.ss/text.wrk. The directory viewer can be displayed using the File > Open command.
- 2. . Select Control > Object Properties.
The Object Properties dialog box appears. The pathname of the text.txt file appears in the Object Name field.
- 3. . In the New Property Values area, click on the Controlled check box to indicate that you want to place the object under Summit/CM control.
- 4. . Use the default settings of the other controls in the Object Properties dialog box. You do not need to change any of their values. Click the OK button
![]()
The file is now controlled and checked in. The file has one version in its version history and is associated with the Common version history family (this is the default version history family).
Displaying Summit/CM Attributes and Check Out
- 1. . With text.txt selected in the directory viewer, select the View > Format > Cm Attributes command.
The display in the directory viewer changes to show the version history family (history) the object is associated with, the current version, and whether the object is checked in or out. Your display looks like this:
![]()
- 2. . With text.txt selected in the directory viewer, select Control > Check Out.
The Check Out dialog box is displayed with text.txt selected in the Objects to Check Out field.
- 3. . You are going to use the defaults so click on OK.
The file text.txt is now checked out.
Abandoning ChangesUsing the Control > Abandon command cancels your checked-out version of a file without creating a new version of the file in the Summit/CM database.
- 1. . With text.txt still selected in the directory viewer, select Control > Abandon.
- 2. . The Abandon dialog box is displayed with text.txt selected in the Abandon and revert to last checked-in version field.
- 3. . Click on OK.
When you abandon a checked-out file, any changes you have made to the file are discarded and no new version is created. An option exists that allows you to save the text of the file, if desired.
For more information on how to save changes in an abandoned version file, see the Control > Abandon command.
Checking Out, Modifying, and Checking In
- 1. . With text.txt selected in the directory viewer, select Control > Check Out. and clik on OK to check out the file.
- 2. . If the file is not open in a text editor, open it by selecting File > Open or double-clicking on the filename.
- 3. . In the text editor, add a line anywhere in the code:
--this is another version
Additional information is available on using the editor.
- 4. . Select Control > Check In in the editor window.
- 5. . Click on OK in the Check In dialog box.
Apex saves the current version of the file and creates a new version in the version control database.
- 6. . With text.txt selected in the directory viewer, select View > Format > CM Attributes.
The display should reflect that there are two versions of text.txtand that the file is checked in.
You have just completed the Configuration Control Module. Please close all the windows you opened for this module.
Rational Software Corporation http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |