ClearCase Support: Recursively Make Elements
If you need to recursively make elements or import data into a ClearCase VOB, then you can run this small UNIX Perl script to do just that. The benefit of this script, versus the tools that come with ClearCase, is that the user does not have to be VOB owner to import data. Any user account that has write access to a VOB or directory can use this Perl script. Unfortunately, this script can be slow for an extremely large amount of data, yet it is completely automated.
NOTE: These instructions are no longer valid for ClearCase v6 (2003) or higher. There is now a newer and easier command to use that you can find here.
Here is how to run this script from the UNIX command line. Keep in mind that the data would need to have been already copied to the View in the exact location of the VOB where the dta will be added.
|$ re_mkelem.pl <NEW_ELEMENT_1> [NEW_ELEMENT_2] ...|
For instance, if you want to add to source control the directory "/vob/tools/ABC" and all the data in this directory, no matter how many recusive sub-directories there are, then you can run these commands:
$ cd /vob/tools/
$ re_mkelem.pl ABC
You can download this Perl script here, or you can copy-n-paste from here:
This script was written for www.philforhumanity.com.
by Phil for Humanity