0% found this document useful (0 votes)
682 views

CC Unix Cheatsheet

This document provides a cheat sheet for using ClearCase on Unix systems. It lists common ClearCase commands, how to set up ClearCase on Unix, configure views, and basic operations within snapshot and dynamic views. Key points covered include checking elements in and out, creating and removing views, setting config specs, and comparing file versions.

Uploaded by

abraham_jacob_1
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
682 views

CC Unix Cheatsheet

This document provides a cheat sheet for using ClearCase on Unix systems. It lists common ClearCase commands, how to set up ClearCase on Unix, configure views, and basic operations within snapshot and dynamic views. Key points covered include checking elements in and out, creating and removing views, setting config specs, and comparing file versions.

Uploaded by

abraham_jacob_1
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

CLEARCASE FOR UNIX CHEAT SHEET

CLEARCASE COMMANDS
1 GENERAL COMMANDS
These are a subset of the commands and options available to you. Check the man page for more information.
CHECKOUT cleartool co [-unreserved] [-c comment] element-path
CHECKIN cleartool ci [-c comment] element-path
UNCHECKOUT cleartool unco [-keep] [-rm] element-path
CREATE NEW ELEMENT PARENT DIRECTORY MUST FIRST BE CHECKED OUT AND MUST ALSO BE CHECKED BACK
IN.
- Directory cleartool mkdir dir-path
- Element cleartool mkelem [-mkpath] [-eltype element-type] element-path
SET CONFIG SPEC cleartool setcs configspec_textfile
EDIT CONFIG SPEC cleartool edcs
LIST VERSION TREE cleartool lsvtree [-all] element-path
LIST CHECKOUTS cleartool lsco [-me |-user user-id] [-recurse | -all] [element-path]
SHOW CURRENT VIEW INFORMATION cleartool pwv

12/9/2021 /conversion/tmp/scratch/58533395.doc Page 1 of 5


CLEARCASE FOR UNIX CHEAT SHEET
Snapshot View Dynamic View
Working directory view: {View_Tag} Working directory view: {View_Tag}
Set view: ** NONE ** Set view: {View_Tag}

12/9/2021 /conversion/tmp/scratch/58533395.doc
Page 2 of 5
CLEARCASE FOR UNIX CHEAT SHEET
LIST ELEMENT HISTORY cleartool lshistory [-short] [-long] element-path
COMPARE TWO VESRSIONS OF A FILE cleartool diff [–serial_format | –diff_format | –columns n] [–
predecessor | element1-path] [element2-path …]
Ex. cleartool diff –diff_format Makefile Makefile@@R2.0.B22
Compare Makefile in current view with the one in build 22.
SHOW MAN PAGES cleartool man [command]
REMOVE OLD VIEW cleartool rmview [ [-tag dyn-view-tag] | [snap-view-dir] ]
2 DYNAMIC VIEWS
 Set into dynamic view cleartool setview view-tag
 Mount a vob (/vobs/* directory) cleartool mount /vobs/vob-name
3 SNAPSHOT VIEWS
 Update snapshot view cleartool update

ACCESSING CLEARCASE ON UNIX


4 ENVIRONMENT SETUP
UPDATE PATH VARIABLE add /opt/rational/clearcase/bin to your PATH.
export PATH=/opt/rational/clearcase/bin:$PATH
UPDATE MANPATH VARIABLE add /opt/rational/clearcase/doc/man to your MANPATH.
export MANPATH=/opt/rational/clearcase/doc/man:$MANPATH

5 LOCATION OF DEFAULT CONFIG SPECS


Default config specs have been created for you based on VOB and branch that you are working on in the following
location
/vobs01/configspecs/ux/{vobname}/{release}/{vobname}_{branch}.CS.txt
For example, the config spec for development on infopro_server release 2.0_iter2 branch is located at
/vobs01/configspecs/ux/infopro_server/2.0/infopro_server_r2.0_iter2.CS.txt
6 INTERFACES
 Command Line: Commands are entered via standard unix prompt, where cleartool precedes the clearcase sub-
command name.
o For example, to see the version tree of a file, run “cleartool lsvtree [file]”
 X-Windows GUI:
o To start the X-windows GUI, run “xclearcase” from the command prompt.
o If you want to, start the GUI in the background, so you can keep using the shell.

12/9/2021 /conversion/tmp/scratch/58533395.doc Page 3 of 5


CLEARCASE FOR UNIX CHEAT SHEET

USING VIEWS
7 SELECTING A VIEW NAME/TAG
Pick a name for your view using the following convention: {userid}_{viewtype}_{vob}_{branch}
o View type will be sv for snapshot, dv for dynamic, wv for web
For example, my snapshot view for development on the release 2.0 iteration 2 branch for infopro_server would be
called prdjd_sv_ips_r2.0_iter2

SNAPSHOT VIEWS DYNAMIC VIEWS


View Location ~/Views/{viewname} /vobs
(Where view is created)
View Working
Directory ~/Views/{viewname}/vobs/{vobname} /vobs/{vobname}
(Where view is used)
1. cd to Working Directory
Accessing View 1. Set into View with cleartool setview
(~/Views/{viewname}/vobs/{vobname})
(How to make changes command
in view)
2. Make sure you are not set into a dynamic view
2. cd to Working Directory (/vobs/{vobname}
by running cleartool pwv
If you cannot see files in the dynamic view, you may
need to mount the VOB.
cleartool mount /vobs/{vobname}
You will get an error if you try to mount a vob if
you are currently in the directory to be
Mounting a VOB N/A mounted (Ex. /vobs/infopro_server).
If you cd’ed to the vob directory
before you set into the view, you will
need to exit out of the view, cd to
/vobs, mount the vob, then cd to the
vob directory.
1. Pick a View Tag (Ex. prdjd_sv_ips_r2.0_iter2) 1. Pick a View Tag (Ex. prdjd_dv_ips_r2.0_iter2)
2. cleartool mkview -snapshot -tag 2. cleartool mkview -tag {viewtag}
{viewtag} -stgloc views_emc -stgloc views_emc
~/Views/{viewtag} 3. cd to View Location (/vobs)
3. cd to View Location (~/Views/{viewtag}) 4. Set Config spec with cleartool setcs
4. Set Config spec with cleartool setcs {cs_file}
Creating View {cs_file} No load rules are required for dynamic views.
5. Edit Config spec to add Load Rules using
cleartool edcs
- Copy all files from the VOB…
load /vobs/{vob}
- Copy select files
load /vobs/{vob}/{subdirectory}
1. cd to Working Directory
Updating View N/A, Updated automatically
2. Run cleartool update [ {filepath} ]
1. Go to View (see. Accessing View above)
2. Resolve existing Checkouts
a. List Checkouts with cleartool lsco -recurse -cview
b. Either Check in or Undo all checkouts.
3. Check for non-versioned file.
Deleting a View a. List View Private Files using cleartool ls -view_only -recurse
b. Run mkelem for files that should be versioned.
4. Remove Files with cleartool rmview as listed below
5. cleartool rmview ~/Views/{viewtag} 5. Exit out of dynamic view by running exit
6. cleartool rmview -tag {viewtag}

12/9/2021 /conversion/tmp/scratch/58533395.doc Page 4 of 5


CLEARCASE FOR UNIX CHEAT SHEET

12/9/2021 /conversion/tmp/scratch/58533395.doc Page 5 of 5

You might also like