--------------------------------------------------------- Telelogic SDL/ClearCase Integration Copyright by Telelogic AB 2000 ClearCase is a product of Rational Software Corporation --------------------------------------------------------- We strongly recommend reviewing this entire document for information not available in the user manuals. This document applies to Win95/98/NT. Table of Contents ================= 1 Introduction 2 Installing the ClearCase Dynamic Menu 3 ClearCase Dynamic Menu Commands 4 Tutorial 4.1 Create Directories and Elements 4.2 Create and Check In a SCU file for the SDL System 4.3 Recursive Check In 4.4 Recursive Check Out And Reserve 4.5 Single file Check In and Check Out 5 Diff and Merge of SDL diagrams from ClearCase(PC) 5.1 Installing the new ClearCase Type Manager 5.2 Creating a New Element Type for Diagrams 5.3 Change Elements to New Element Type 5.4 Automatic Creation of New Element Type 1 Introduction ============== This README file explains how to install and use this ClearCase integration for Telelogic Tau SDL suite. In this directory you will find the following files: README -- the file you are reading. clearcase.ini -- a dynamic menu to append to org-menus.ini This dynamic menu are identical for Win95/98/NT and Unix. 2 Installing the ClearCase Dynamic Menu ======================================= Please add either the clearcase.ini to your org-menus.ini file. The SDL suite will search for the org-menus.ini first in the directory where the SDL suite was started, then in a directory pointed to by the HOME environment variable and finally in the directory in which the SDL suite was installed. If you do not already have a org-menus.ini file, the clearcase.ini file can serve as one. Just copy clearcase.ini to either your HOME directory or to where you have the SDL suite installed and rename it to "org-menus.ini". For more information on dynamic menus, please see "Defining Menus in the SDL Suite" in chapter1, "User Interface and Basic Operations", of the User's Manual. 3 ClearCase Dynamic Menu Commands ================================= 3.1 Refresh ~~~~~~~~~~~ Refreshes the Organizer Window. This updates the file permissions shown in the Organizer Window to match the current status of the files. No ClearCase command is involved in this command. 3.2 Recursive Check In ~~~~~~~~~~~~~~~~~~~~~~ Checks in a tree (or subtree) of object files, starting at the selected object. If the SDL System file icon is the selected object then all files in the Organizer Window are checked in. SCU files are included in the check in. The user is prompted for a check in comment. 3.3 Check In Object ~~~~~~~~~~~~~~~~~~~ Checks in the selected object file. The user is prompted for a check in comment. 3.4 Check In SCU ~~~~~~~~~~~~~~~~ Checks in the SCU file containing the selected object. The user is prompted for a check in comment. 3.5 Check In Link file ~~~~~~~~~~~~~~~~~~~~~~ Checks in the link file. The user is prompted for a check in comment. 3.6 Check In Directory ~~~~~~~~~~~~~~~~~~~~~~ Checks in the directory of the selected object file. The user is prompted for a check in comment. 3.7 MkDir for Object ~~~~~~~~~~~~~~~~~~~~ Creates a new directory in the current view. The parent directory must already exist in the vob and must be checked out. 3.8 MkElem for Object ~~~~~~~~~~~~~~~~~~~~~ Creates a ClearCase element for the current object. 3.9 MkElem for SCU ~~~~~~~~~~~~~~~~~~ Creates a ClearCase element for the current SCU file. 3.10 MkElem for Link file ~~~~~~~~~~~~~~~~~~~~~~~~~ Creates a ClearCase element for the Link file. 3.11 Recursive MkElem ~~~~~~~~~~~~~~~~~~~~~ Creates ClearCase elements for all objects in the selected subtree. 3.12 Recursive Check Out and Reserve ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Checks out and reserves a tree (or subtree) of object files, starting at the selected object. If the SDL System file icon is the selected object then all files in the Organizer Window are checked out and reserved. SCU files are included in the check out. 3.13 Check Out and Reserve Object ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Checks out and reserves the selected object. 3.14 Check Out and Reserve SCU ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Checks out and reserves the SCU file containing the selected object. 3.15 Check Out and Reserve Object and SCU ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Checks out and reserves both the selected object and its containing SCU file. 3.16 Check Out and Reserve Link file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Checks out and reserves the link file for the current SDL System. 3.17 Check Out and Reserve Directory ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Checks out and reserves the directory containing the selected object. 3.18 Unreserve Object ~~~~~~~~~~~~~~~~~~~~~ Unreserves the selected object file (the cleartool command uncheckout is used). 3.19 Unreserve SCU ~~~~~~~~~~~~~~~~~~ Unreserves the selected SCU file. 3.20 Unreserve Link file ~~~~~~~~~~~~~~~~~~~~~~~~ Unreserves the selected Link file. 3.21 Show Revision History ~~~~~~~~~~~~~~~~~~~~~~~~~~ Shows the revision history for the selected object in the Organizer Log Window. 4 Tutorial ========== This tutorial will show you how to add an existing SDL System to your ClearCase vob. This tutorial assumes that the user has completed the installation steps detailed above. 4.1 Create Directories and Elements ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Make a scratch directory in your vob for use in this tutorial, for example: cleartool mkdir -nc c:\myrep\tutorial where "myrep" is the name of a vob mounted on your workstation. Copy demongame tutorial files from the Tau installation to the scratch tutorial directory: copy c:\TelelogicTau40\sdt\examples\demongame\* c:\myrep\tutorial NOTE: You do not need to copy the "omelink" and "sdl92" subdirectories. Change the permissions for all the files from read-only to readable and writeable. Create elements for all demongame files (except the .sdt file): cd c:\myrep\tutorial cleartool mkelem -nc *.spr *.sbk *.msc *.ssy In a shared development environment *.sdt files function as a cache of the shared SDL system. Therefore *.sdt files should be local and not checked in as a ClearCase element. As further explained below, the SCU file associated with the *.sdt file should be checked in as a ClearCase element. 4.2 Create and Check In a SCU file for the SDL System ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Once you have created the directory, copied the tutorial files and created elements for all your files, you are ready to create a SCU file for your SDL System. This SCU file manages all files within your SDL System and allows you to share them with other developers. To create a SCU file for the demongame system do as follows: o open the demongame.sdt file located in c:\myrep\tutorial in the Organizer. o Do a right button mouse click on the "SDT" icon which appears in the upper-left hand corner of the Organizer window. o Select "CM Group" from the pop-up menu and click the radio button labeled "CM Group File". o Click on the "OK" button to except the default file name. A SCU file is now associated with the demongame system file and is named "demongame.sdt.scu". To create a ClearCase element for this file click once on the "SDT" icon and then select "MkElem for SCU" from the ClearCase dynamic menu. The directory containing the SCU file must be checked out. 4.3 Recursive Check In ~~~~~~~~~~~~~~~~~~~~~~ To begin checking in: o Select the "SDT" icon in the Organizer. o Choose the "Recursive Check In" option from the ClearCase dynamic menu. Any error messages and/or progress messages are reported in the Organizer Log Window. If the recursive check in was successful all the file permission flags for the demongame files should be "r". The file permissions for the SCU file associated with the demongame system file should also be "r". 4.4 Recursive Check Out And Reserve ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Now that all the demongame files are checked in you may check them out for editing by: o Select the "SDT" icon in the Organizer. o Choose the "Recursive Check Out and Reserve" option from the ClearCase dynamic menu. o The "SDT" icon now appears greyed-out. Save the system file by choosing the "File->Save" option from the menu bar. If the recursive check out was successful all the file permission flags for the demongame files should be "rw". The file permissions for the SCU file should also be "rw". 4.5 Single file Check In and Check Out ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For single file check in and check out simply select the file you would like to check in or out and choose the appropriate option from the ClearCase dynamic menu. To check in or out a SCU file simply select any of the files which are controlled by the SCU file and choose "Check Out and Reserve SCU file" from the ClearCase dynamic menu. 5 Diff and Merge of SDL diagrams from ClearCase(PC) =================================================== This tutorial will show you how to add a new ClearCase Type Manager that will enable graphical diff and merge operations on SDL diagrams from ClearCase. 5.1 Installing the new ClearCase Type Manager ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ClearCase type managers are a collection of programs placed in \bin. A map file in the directory \lib\mgrs controls what type manager is called for what element type and operation. To install the new type manager, do as follows: o Copy the program sdl_diff_merge_manager.exe to the directory \bin (usually C:\Program Files\atria\bin) o Edit the map file \lib\mgrs\map (C:\Program Files\atria\lib\mgrs\map) and add entries last in the map file as shown below. Copy all the lines from z_whole_copy and change z_whole_copy to sdl_manager (the name of the new type manager). Then change the paths for the xcompare and xmerge entry to point at the sdl_diff_merge_manager.exe and leave all the other entrys exactly the same as for z_whole_copy. sdl_manager construct_version ..\..\bin\zmgr.exe sdl_manager create_branch ..\..\bin\zmgr.exe sdl_manager create_element ..\..\bin\zmgr.exe sdl_manager create_version ..\..\bin\zmgr.exe sdl_manager delete_branches_versions ..\..\bin\zmgr.exe sdl_manager compare ..\..\bin\cleardiff.exe sdl_manager xcompare ..\..\bin\sdl_diff_merge_manager.exe sdl_manager merge ..\..\bin\cleardiff.exe sdl_manager xmerge ..\..\bin\sdl_diff_merge_manager.exe sdl_manager get_cont_info ..\..\bin\zmgr.exe 5.2 Creating a New Element Type for Diagrams ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To create a new element type for SDL diagrams do as follows: o >> cd /vobs/my_vob... (Go to the VOB you want to create the new element type for) o >> cleartool mkeltype -supertype file -manager sdl_manager sdl_diagram sdl_diagram is the name for the new type. You can use the -global flag to update several vobs in one operation. 5.3 Change Elements to New Element Type ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change the element type on the already stored files in the VOB that will be using the new diff and merge methods to the new element type: o >> cleartool chtype -force . 5.4 Automatic Creation of New Element Type ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When a new element is created with mkelem, the option -eltype can be used to specify what type the element should be. The use of magic files can make newly created elements of a certain type, for example *.spr, get the new element type automatically(without the use of -eltype). The default magic file is in \config\magic\default.magic. Please see 'cleartool man cc.magic' on this subject.