ClearCase is a software configuration management system. It is also the tool Concur uses for documentation management and version control. All historical versions are located in a Versioned Object database (VOB). This document covers the most frequently used procedures in ClearCase. It contains the following sections: ABOUT INSTALLING CLEARCASE...2 CREATING A VIEW IN CLEARCASE...2 Important Notes...10 REMOVING A VIEW FROM CLEARCASE...10 COMMON PROCEDURES...12 To add a file or directory to the (ClearCase) project...12 To check out a file...12 To check in a file...12 To undo a check out...13 To identify checked out files...13 To check out all files in a ClearCase folder and check all files back in...14 To add a folder to an existing view...14 Deleting a file from ClearCase...14 About merging files to another branch...15 Author: Vivian Kent Working in ClearCase.doc 1
About installing ClearCase The Configuration Management (CM) team has developed a training guide on ClearCase that includes installation. To obtain the ClearCase installation information: 1. Connect to http://cm on the Concur Intranet. 2. Click ClearCase in the left window. 3. Click UserDoc. 4. Open the CCaseTrain.pps file and print the installation instructions for easy reference. Creating a view in ClearCase If you do not use a laptop, you should create a Dynamic view. If you use a laptop, you should create a Snapshot view. Snapshot view allows you to work just as you would with Dynamic view, with the following exceptions: 1. The files will be copied onto your hard drive so that you can work with them remotely. 2. Periodically, you must perform an update of the snapshot view. This registers your changes so that others can see them. Also, it allows you to register recent changes made by others. To update, select the folder in which the file(s) reside, right-click and choose ClearCase > Update. To create a view: 1. The first time you create a view, you must create a shared folder or drive. This only needs to be done once, regardless of the number of views created. 2. Double-click the ClearCase icon on your desktop to start ClearCase. Author: Vivian Kent Working in ClearCase.doc 2
3. Display the Views tab. Click Create View. 4. Click Create View. Author: Vivian Kent Working in ClearCase.doc 3
5. Make sure No is selected, and click Next. 6. Do one of the following: Click Snapshot. Use this view if you are using a laptop. Click Dynamic. 7. Type a name for the view and ensure the location (path) is correct. Most of the time, you will want a name that includes your user name, the product name, the version, and the branch. In the beginning of a product cycle, you will create a main or mainline view. Later, you may create other views, such as a Beta view, IR view, GM view, and so on. Ensure the location includes the shared directory you created. Do not use spaces in the name. Instead, use underscores. Author: Vivian Kent Working in ClearCase.doc 4
Important: If you are creating a Snapshot view, perform steps 8-9, and then proceed to step 9. If you are creating a Dynamic view, go directly to step 10. 8. Click Advanced Options. (You only need to use Advanced Options the first time you create a snapshot view.) 9. In the Advanced Options dialog, do the following: Make sure the View server storage directory is pointing to your computer name (not to a server), and ensure that the directory you shared earlier is selected. Click Browse to specify the correct path, if you need to. Author: Vivian Kent Working in ClearCase.doc 5
10. Click OK. Author: Vivian Kent Working in ClearCase.doc 6
11. Click Yes, and then click Browse. 12. Select the project you will be working on and click Open. 13. Select the View Profile name (for example vp_6.5) and click Open. The View Creation Wizard reappears with the correct information under Enter the Profile name. Author: Vivian Kent Working in ClearCase.doc 7
14. Click Finish. The following confirmation appears: 15. Click OK. Important: If you are creating a Snapshot view, perform steps 16-18. If you are creating a Dynamic view, you are done! Author: Vivian Kent Working in ClearCase.doc 8
Snapshot only 16. In the Choose Elements to Load dialog box, select the folders you want to view in your Snapshot view, and then click Add. Because this is a snapshot view, the files take up space on your hard drive. Therefore, download only those folders you need to work with. Author: Vivian Kent Working in ClearCase.doc 9
17. Click OK. The following confirmation message appears. Snapshot only 18. Click OK. Note If you receive a message about hijacked files, click Details to see if any of the hijacked files belong to you. If they do, you can convert them to checked out files. If the hijacked files belong to someone else, you don t need to do anything. Important Notes To update Snapshot view, you can select the folder in which the file(s) reside, right-click and choose ClearCase > Update. If you try to do an update from the file itself, it will not work. Make sure you check in files before the significant builds. Usually, you should check in files every Monday and Wednesday night for your changes to appear in the Tuesday and Thursday builds. For information on finding checked out files, see To identify checked out files later in this document. Removing a view from ClearCase If you have any older views on your hard drive, you may want to remove them. Warning: Make sure you check in all files and/or add all files in this view to ClearCase before you delete the view. Otherwise, they will be lost when the view is deleted. Author: Vivian Kent Working in ClearCase.doc 10
1. Open ClearCase. 2. Click Remove View. 3. Do one of the following: If you want to remove a Snapshot view, click the Snapshot tab. If you want to remove a Dynamic view, click the Local tab. 4. Select the view you want to remove, and click OK. Author: Vivian Kent Working in ClearCase.doc 11
Common procedures To add a file or directory to the (ClearCase) project 1. In Windows Explorer, locate the file or folder on your C drive that you want to add. 2. Open another window in Windows Explorer and navigate to the parent (ClearCase) directory to which you want to add the files or folder. 3. Drag the files or folder to the parent directory. 4. In the parent directory, select the files or folder you just copied. 5. Right-click on the selected objects. From the shortcut menu, choose ClearCase > Add to Source Control. 6. In the Add To Source Control dialog box, enter a comment and uncheck the Keep Checked Out option. 7. Click OK. Important note about new directories: Although this procedure will add a new directory to ClearCase, the directory will not be automatically included in the product installation. You must contact the person doing the installs on the CM team and inform them that you have added a new directory, and provide them with the path and name of the directory. They can then make the appropriate adjustments to the popweb.ini file. To check out a file 1. Select the file(s) you want to check out. 2. Right-click on the selected files. From the shortcut menu, choose ClearCase > Check Out. The Check Out dialog box appears. 3. For Comment, type a brief explanation of the action you will perform on the file. 4. Leave the Reserved check box selected if you don t want anyone else working on the files after you check them out. If you are working on source code, however, you should clear this check box because others may need to work on the same file at the same time. 5. Click OK. To check in a file 1. Select the file(s) you want to check in. 2. Right-click on the selected files. From the shortcut menu, choose ClearCase > Check In. Author: Vivian Kent Working in ClearCase.doc 12
The Check In dialog box displays. 3. For Comment, type a brief explanation of the action you performed on the file. 4. Click the appropriate check box. 5. Click OK. Important If you are in Snapshot view, remember to perform an update on the changed files. Select the folder in which the file(s) reside, right-click and choose ClearCase > Update. To undo a check out 1. Select the file(s) you want to check in. 2. Right-click on the selected file. From the shortcut menu, choose ClearCase > Undo Checkout. To identify checked out files 1. Select any file in the folder. 2. Right-click on the selected files. From the shortcut menu, choose ClearCase > Find Checkouts. You can check in the folders from the Find Checkouts window. Note The CM team has become aware of a bug whereby this may not work 100% from the subfolder level. To ensure that ClearCase returns all the checkouts, you may want to perform this procedure from the project folder level. If you do so, you can designate that ClearCase search only for your checkouts, in your current view, as shown in the following dialog box. Author: Vivian Kent Working in ClearCase.doc 13
To check out all files in a ClearCase folder and check all files back in 1. In the ClearCase project, locate the folder for the files you want to check out (update). 2. In ClearCase, open the folder and select all the files. 3. Right-click, and choose ClearCase > Check Out. 4. Enter a comment, and then click Apply to All. 5. Update the files, or some of the files, in the folder. 6. Right-click and choose ClearCase > Check In. 7. Select the Even If Identical To Previous Version checkbox, and then click the Apply to All button. Tip: If you forget to check the Even If Identical To Previous Version checkbox, then do a Find Checkouts. You can check all files in from the window that is displayed. Important If you are in Snapshot view, remember to perform an update on the changed files. Select the folder in which the file(s) reside, right-click and choose ClearCase > Update. To add a folder to an existing view 1. Select the main view folder. 2. Right-click and select ClearCase > Properties of View. 3. Click the Load Rules tab, and then click Edit Load Rules. 4. Select the folder you want to add, click Add, and then click OK. Deleting a file from ClearCase This is a procedure that should be used sparingly to delete obsolete files. If you delete a file by mistake, contact Philip W. on the CM team and ask them to reinstate the file from ClearCase. To delete a file from ClearCase: 1. In Windows, check out the entire the folder that contains the file. Important: You must delete at the folder level, not the file level. 2. In DOS, locate the drive and file you want to delete. (You should do this from the Main ClearCase project file, not a branch.) 3. At the command line, type cleartool rmname [filename] You can list several names, just separate them by a space. 4. Press ENTER. Author: Vivian Kent Working in ClearCase.doc 14
5. Check the parent folder back in. Notes: Tip: To check out the folder from DOS, type cleartool co. (Make sure to type the space and then the period (.).) Then press Enter and type a comment. To check in the folder from DOS, type cleartool ci. To accept the default comment, type a period (.) You can copy and paste in DOS. In DOS, right click the title bar of the DOS window. Choose Properties > Options. Select Quick Edit and Insert Mode. Then, you can highlight a filename, right-click twice, and the filename is inserted on the rmname command line. About merging files to another branch It is important to merge files from branches to the mainline (or branch), rather than simply copying updated files to the mainline (or branch). This way, Dev can make sure all updated files are included in beta branches (or mainline). Contact the CM team for assistance. Author: Vivian Kent Working in ClearCase.doc 15