I'm trying to look at a bunch of old versions
I'm not sure what you are talking about is a bunch of old versions of a single file, a bunch of old versions of several files.
To visualize several old versions of a single file, the simplest is to display its version tree ( ct lsvtree -graph File ), and then select the version, right-click it and " Send To ", which accepts several files (for example, Notepad ++) . In a few clicks you will see these old versions.
Note: you must have CC6.0 or 7.0.1. IFix01 (7.0.0 and 7.0.1 cannot "send" to a file with the following error message " Access to unnamed file was denied ")
But for visualizing several old versions of different files, I would recommend dynamically presenting and editing the configuration specification of this view (rather than the snapshot that you are currently working on) to quickly select all these old files (I hope with a simple selection rule, for example " element * aLabel ")
[From comments:]
what is the idiomatic way to "cat" an earlier version of a file?
The idiomatic way is to present a dynamic view (which you configure using the same configuration configuration as the existing existing snapshot).
Then you can view (as in the "change directory" section) various extended file paths .
If you want to quote all versions of a file branch, you go to:
cd /view/MyView/vobs/myVobs/myPath/myFile@@/main/[...]/maBranch cat 1 cat 2 ... cat x
' 1 ', ' 2 ', ... ' x ' is version 1, 2, ... x of your file in this thread.
An extended path is not available for presenting a snapshot , so your "hacking" is the way to go.
However, 2 comments here:
- to quickly display all previous versions of the snapshot file in this branch, you can enter:
(single line version for copy-paste, Unix syntax :)
cleartool find addon.xml -ver 'brtype (aBranch) &&! version (... / aBranch / LATEST) &&! version (... / aBranch / 0) '-exec' cleartool diff -ser empty "$ CLEARCASE_XPN" '
(multi-line version for reading :)
cleartool find addon.xml -ver 'brtype (aBranch) &&
! version (... / aBranch / LATEST) &&
! version (... / aBranch / 0) '
-exec 'cleartool diff -ser empty "$ CLEARCASE_XPN"'
- you can quickly get out a little better with
(single line version for copy-paste, Unix syntax :)
cleartool find addon.xml -ver 'brtype (aBranch) &&! version (... / aBranch / LATEST) &&! version (... / aBranch / 0) '-exec' cleartool diff -ser empty "$ CLEARCASE_XPN" '| ccperl -nle '$ a = $ _; $ b = $ a; $ b = ~ s / ^> + \ s (?: file \ s + \ d +: \ s +)? // g; print $ b if $ a = ~ / ^> / '
(multi-line version for reading :)
cleartool find addon.xml -ver 'brtype (aBranch) &&
! version (... / aBranch / LATEST) &&
! version (... / aBranch / 0) '
-exec 'cleartool diff -ser empty "$ CLEARCASE_XPN"'
| ccperl -nle '$ a = $ _; $ b = $ a;
$ b = ~ s / ^> + \ s (?: file \ s + \ d +: \ s +)? // g;
print $ b if $ a = ~ / ^> / '
Thus, the result is better.
The " cleartool get " command (man page) mentioned below by Brian does not do stdout:
The get command only copies the elements of the file to the view.
On a UNIX or Linux system, copy /dev/hello_world/foo.c@@/main/2 to the current directory.
cmd-context get βto foo.c.temp /dev/hello_world/foo.c@@/main/2
On a Windows system, copy \dev\hello_world\foo.c@@\main\2 to the C:\build directory.
cmd-context get βto C:\build\foo.c.temp \dev\hello_world\foo.c@@\main\2
Thus, it is possible if, by passing the result to cat (or type in windows), you can do something with the output of the specified cat ( type ) command.
cmd-context get βto C:\build\foo.c.temp \dev\hello_world\foo.c@@\main\2 | type C:\build\foo.c.temp