| |
|
29. To Add a new file to an existing directory. This is multi part operation as to achieve transparency, cleartool directories are themselves versioned. So ... #1 First, you have to checkout the directory, because adding a file will change the directory. Enter a checkout comment which can also serve as the check in comment later. cl co -c "Add file xxx" . The period indicates that you are checking out a directory. #2 Make an (empty) file 'element' cl mkelem -c "file description" file.ext NOTE! This assumes that the new element has an extension that is known to Cleartool. If not, and you get a gobbledegook message 'Cant pick element type from...' then you must specify an element type eg: cl mkelem -c "Config stuff" -eltype text_file cb.cfg The file types are: text_file : Flat ascii text file file : Any binary file that you don't mind Cleartool compressing for storage. compressed_file : Binary file that's already compressed and you want Cleartool to store as-is. #3 Copy the source code to the new file. #4 Checkin the file. This will be the first revision. #5 Check the directory back in. #6 You should check that you have set up the file with an apppropriate storage type. See: Tip 24 'To find out the file type of a File'. 30. To use symbolic links avoid duplicating an archive file in different directories. Suppose we have directory A with archived file.ext eg: /../VOBS/.../A/file.ext and we want to have the same file in Directory B. Rather than duplicate the file, we can place a link in directory /../VOBS/.../B to point to the 'real' archive file in directory A. To setup the link:
31. To move an atria file from one directory to another. Check out the source directory : Check out the target directory : In the source directory type : 32. To make a view private copy of a file. co -unreserved 33. To Cleartool 'rm' an atria archive file. First enter the ClearCase tool: Once INSIDE the ClearCase tool This will remove the archive from the view, but it is still accessible and can be viewed or retrieved if you need it again at some later time. Warning! If you use rm filename outside Cleartool ie at the shell level the file is GONE! 34. To look at a file that has been Cleartool 'rm'd'. more .@@/main/5/file.ext@@/main/LATEST Replace '5' with the last version of the directory that contained the file. Instead of more you can use less - see man less for info.
|