I unpacked a zip-file delivery into a clearcase view. Now I want to add the complete file tree to the repository. The GUI only provides an "Add to source control ..." for individual files/directories. Do you know how to recursively add the whole tree?
(I'm on a Windows system, but have Cygwin installed.)
ClearTeam Explorer, version 8 (maybe earlier as well), has recursive add of subdirectories/files when you select "Add to Source Control". When the "Add to Source Control" dialog box appears, check the "Include descendant artifacts of the selected directories" checkbox and uncheck the "Checkout descendant files only, do not checkout descendant directories" checkbox.
Here is one other way I found by using the Windows Explorer:
Search...
from the context menu on the target directory.*
.Ctrl-A
) files/directories in the result list.ClearCase
>Add to source control...
from the context menu on an item in the result list.There you go ...
You have to use the commandline. The Context menu in Explorer doesnt do this recursively!
Heres a script to do it And tips to integrate the script from Explorer
http://www.ibm.com/developerworks/rational/library/4687.html
I would rather go with the clearfsimport script, better equipped to import multiple times the same set of files, and automatically:
So if your 'zip-file delivery needs to be updated on a regularly basis, clearfsimport is the way to go, but with the following options:
Note the :
From CMWiki, about that 'nset' option:
Since I did not have access to clearfsimport , I added the files/directories in a two step process:
1.)
find . ! -path . -type d | xargs cleartool mkelem -mkpath -nc
This will create nodes for all new directories recursively
2.)
find ./ -type f | xargs cleartool mkelem -nc
This will create nodes for all new files recursively