Вы находитесь на странице: 1из 36

IBM Software Group

Essentials of Rational ClearCase Module 1: Getting Started

Objectives
Upon completing this module, you should be able to:
Define software configuration management (SCM) Explain how ClearCase implements SCM Explain ClearCase roles Define basic ClearCase terminology and concepts Explain the typical developer workflow in ClearCase Set up your ClearCase workspace Access ClearCase Help

Software Development and Change


Software development involves change A defect to be fixed An existing function to be enhanced A new feature to be added A new platform to support A customer-driven special project Internationalization

Change Causes Developers Pain


Working in isolation, you cant see code changes made by team members You cant work in parallel on files that a co-worker is modifying You frequently lose time and have to redo work because of lost defects or overwritten code You have trouble determining which versions of the code you should be working on You have difficulty answering your managers questions about project status You dont know who on the team is working on what You have no idea which versions of files went into a build
4

Software Configuration Management (SCM)

SCM is about managing change to software.


Brian White, Software Configuration Management Strategies and Rational ClearCase (2000)

Software Configuration Management (cont.)


A successful SCM effort ensures: Safety Stability Control Auditability Reproducibility Traceability Scalability

ClearCase Implements SCM


Version control
Version all types of files and directories

Workspace management
Work in parallel with other developers

Build management
Ensure the integrity of all software elements Accurately reproduce every release Trace and reproduce builds
7

Process control
Record and report actions, history, and milestones Customize process

ClearCase Roles
ClearCase developer
Set up workspace Make changes Integrate changes Update workspace

ClearCase integrator
Create integration workspace Create baselines Build components

ClearCase configuration manager


Write CM plan Design development environment Establish CM Policies Assign and schedule work Monitor project status
8

ClearCase administrator
Set up hardware environment Implement development environment Maintain hardware and development environments

Typical Developer ClearCase Workflow

Typical Workflow: Setting Up Your Workspace

10

What Is a Versioned Object Base (VOB)?


A permanent, read-only data repository that:
Stores files, directories, and metadata Stores version-controlled data Displays its contents as files in a file system Stores anything that can be represented as a file or directory Can be replicated in two or more sites

11

Projects and VOBs


A project can span more than one VOB Multiple projects can share common VOBs

12

What Is an Element?
A file or a directory, under source control, stored in a ClearCase VOB Can be any object that can be stored in a native file system, including:
Source files Directories Binary files Object libraries Documents
13

What Is a Version?
An element consists of a set of versions, organized into a version tree Each version represents one revision of a file under source control Versions are displayed in a workspace or view

14

What Is a View?
A ClearCase mechanism that allows users access to versions of elements in VOBs An isolated workspace for a user or a group Enables users to work in parallel

15

What Is a Configuration Specification?


For each view, a set of ordered rules used to select at most one version of each element Determine which versions of an element are visible in the view

16

Types of Views

17

Which Type of View Should I Use?


Dynamic
You want to access elements in repositories without copying them to your computer You want the view to reflect changes made by other team members at all times Your project uses build auditing
18

Snapshot
You are using Win 9X, Win ME, or ClearCase LT, which do not support dynamic views You want to work disconnected from the network You do not need build avoidance

Structure of a Dynamic View

19

Structure of a Snapshot View

20

Intro to ClearCase File Browser


Operational buttons Current working directory

File and directory information

21

Creating a Dynamic View in the File Browser


1 To create a view, click View > Create.

22

Creating a Dynamic View in the File Browser (cont.)


2 Select Dynamic View. 3 Choose a view name (or view-tag).

4 Click Advanced Options to specify the location of the view storage directory.
23

Creating a Dynamic View in the File Browser (cont.)


5 Confirm the view information, and then click Continue.

24

Creating a Dynamic View from CLI


mkview -tag dynamic-view-tag dynamic-view-storage-pname % cleartool mkview -tag pat_r2_dev /home/pat/pat_r2_dev.vws
Must exist Must NOT exist

Created View. Host-local path: saturn:/home/pat/pat_r2_dev.vws Global path:/net/saturn/home/pat_r2_dev.vws It has the following rights: User : pat : rwx Group : user : r-x Other : : r-x
25

Starting a Dynamic View from CLI


setview view-tag

Starts a dynamic view Sets the specified view to your current working view Spawns a shell process that is set to the dynamic view
% cleartool setview pat_r2_dev <pat_r2_dev>%

26

Starting a Dynamic View from the File Browser


1 Click View > Set.

2 Select the view tag.

27

Displaying Your Current View


pwv [-short] [-wdview | -setview | -root]

<pat_r2_dev_view>% cleartool pwv Working directory view: ** NONE ** Set view: pat_r2_dev_view

28

Mounting a VOB for Dynamic Views


mount [-options mount options] {vob-tag | -all}

The mount command activates a VOB for use on the local workstation You access a VOB through its unique tag name Public VOBs are mounted on boot up and with the mount all command
% cleartool mount /vobs/Hardware

29

Accessing the VOB in the File System


The VOB-tag or the VOB mount point is the full pathname with which users access VOBs VOB-tags are regular native operating system directories
/vobs /VobC /VobB
All mounted VOBs are visible under /vobs Mount point through which all mounted VOBs can be accessed

/VobA

30

Why Is the VOB-tag Directory Empty?


Directories beneath the VOB-tag are inaccessible until you
Mount the VOB Set into a dynamic view
Example: % cd /vobs/Hardware % ls % % cleartool mount /vobs/Hardware % cleartool setview pat_r2_dev_view % ls bin lost+found src
31

Accessing Online Help


Access ClearCase Help from the CLI or from the File Browser
Use the common UNIX man page command to view the reference manual

Use the Help option to view command usage

32

Accessing Online Help (cont.)

33

Accessing Online Help (cont.)

Online Manuals

34

Module Review
What is SCM? How does ClearCase help you manage change to software? What tasks are involved in setting up your workspace? What is a VOB? Element? Version? View? How do you access particular versions of elements in a ClearCase VOB? What is the difference between a snapshot view and a dynamic view? How do you access online Help in ClearCase?
35

Module Lab
In this lab, you will:
Launch ClearCase GUI Create a dynamic view Mount a VOB

36

Вам также может понравиться