I got a task to copy files with certain extensions from clear case while I need to :
- find all files with certain extension and their map
- copy the mapping but replace the file with a dir that has it's name
- copy the file labels history to that dir
So I know what do to separately but can't figure how to connect things:
Code I used :
# for the latest label :
find . -name '*.extension' | cpio -pdm /path/to/save # this helped me to copy all files and their dir map
# to copy all labels for that file
\cp -r filename.extension@@/main/ /path/to/save # the @@main/ gives me the view of the labels
The "map file" is more seen on Windows with a type manager
On Linux:
This differs from your "dir map".
You can list labels on the current version with:
cleartool descr -fmt "%l" myFile.Using extended paths can work in a dynamic view, but it is best (to get all labels on all branches) to do a:
To combine both code, do a loop on the result of the first
findcommand.