About this task
Tip: This procedure assumes that if you work
in a snapshot view, the element is loaded in the view.
Procedure
- Start a dynamic view or change to a directory loaded
into a snapshot view.
- If a cleartool prompt is not already displayed, display
one. To see the list of versions for an element, type the following command:
cleartool lsvtree element-path
The output of the lsvtree command
uses version-extended paths to identify each version.
For
example:
- On UNIX systems and Linux:
%
cleartool lsvtree prog.c
prog.c@@/main
prog.c@@/main/0
prog.c@@/main/r1_fix
prog.c@@/main/r1_fix/1
prog.c@@/main/r1_fix/2
prog.c@@/main/1
- On Windows systems:
>
lsvtree prog.c
prog.c@@\main
prog.c@@\main\0
prog.c@@\main\r1_fix
prog.c@@\main\r1_fix\1
prog.c@@\main\r1_fix\2
prog.c@@\main\1
- You can use standard differences tools or cleartool diff to
compare versions against each other. For example:
- To open a version, do one of the following, depending
on the type of view you use:
- In a snapshot view, you must use the cleartool get command
to copy a version into your view. If your development application relies on
specific file extensions, the -to argument of the get command
must use the required extension.
For example, the following
command copies
prog.c@@/main/r1_fix/1 (on Windows systems:
prog.c@@\main\r1_fix\1)
to
prog.old.c in the current directory:
- In a dynamic view, you can use this version-extended path just as you would use a
standard path.
For example, in a text editor (on a UNIX system or Linux) or in the
Open window of Visual Studio (on Windows systems), you can use the file name
prog.c@@/main/r1_fix/1 (on a Windows system:
prog.c@@\main\r1_fix\1) to open the first version on the
r1_fix subbranch.
Windows tip: You must use backslashes when providing
version-extended paths to Windows applications.
Results
If your development application relies on specific
file extensions, use a standard copy shell command to copy the version-extended
path to a file name with the required extension.