Paulis software -> Vedit resources -> ClearCase Support 17. 01. 2015  
--------

ClearCase support for VEDIT

ClearCase is a commercial, centralized configuration management and revision control system. It typically uses multiple servers (View servers and File servers). ClearCase uses a virtual file system ("view"), which shows specified versions of each file.

With this macro, you can perfom some of the most common ClearCase functions directly from within Vedit. The macro calls cleartool to execute the commands. See below for description of the commands you can execute. To install the macro, simply unzip it into your user-mac directory. Optionally, you can add call to the macro in your User or Tools menu.

Download Download ClearCase.zip   -   V1.0   -   2010-08-12   -   5 K   -   Vedit 6.15

Description

ClearCase.vdm is a sigle macro for executing ClearCase commands. It displays a dialog box for selecting the command. The options in the dialog box depend on whether the current source file has been checked out or not.

ClearCase tools dialog box for read-only file

If the file has not been checked out, it is read-only and you can not edit it. In this case, the dialog on the right is displayed. With this dialog, you can perform the following operations:

Check Out

Checks out the file for editing. (You can only edit files that have been checked out.)

Label

Creates a label on current file. Labels allow you to identify file versions that belong to specific build (since on ClearCase, version numbers are file specific).
A dialog box opens where you can enter the label text. In addition, you have option to create new label type and to move existing label.

Branch

Creates a new branch type on current vob.

Version tree

Starts a viewer to display graphical version tree. A dialog box opens where you can choose to display version tree either for current file or for current directory. In addition, you have option to choose which versions are displayed (Significant only, Significant+merged, or All).

History

Opens History Browser to show changes made on current file or current direcory. A dialog box opens where you can choose the object (file or directory). In addition, you have option to show minor events, and to only show events created by you.

Diff

Opens Diff tools to compare two versions of current file. A dialog box opens where you can select what to compare: current file to previous version, or current file to Main branch latest version.


ClearCase tools dialog box for checked-out file

When current file has been checked out, the dialog box shows some different options.

Check In

Checks in the current file into the repository in current branch. A dialog box opens where you can enter check-in comment.

Un-checkout

Undo checkout. Discards all changes you have made since you checked out the file. You will be asked for confirmation before the command is executed.

The remaining options are the same as in the other dialog box.


If an error occurs when executing a command, the error code is displayed on status line. In addition, an error window may open at the bottom of the screen to show error details. You will have to manually close that window after reading the message.

Previously used label name, branch name and comment texts are stored in the file clearcase.ini in your user-mac directory.


User menu or Tools menu configuration

To make it easier to run Clearcase functions, you can add the following lines in your User or Tools menu:

1 + 128
ClearCase...
#124=Reg_Free Call_File(#124,"ClearCase.vdm") Reg_Empty(#124)

(You may need to change the hot-key to suit your menu.)


Tips and Tricks

ClearCase virtual file system tends to be slow. Things like Wildfile search and using Ctags database tend to be tens of times slower than on your local hard disk. Here are some tricks on how to speed up things.

Ctags / Utags

In utags.vdm, you can use cache option to speed up the symbol look-up.
Near the beginning of utags.vdm file, you can find a block marked as "Configuration options". Change the setting #70 = 0 to  #70 = 1.

This enables caching of the tags file as a copy in VEDIT_TEMP directory on your local hard disk. When you call utags.vdm, it first checks if the cached file exists and uses it. If not, it searches tags from current files directory tree as usually. (When you run ctags.vdm, the cached file is deleted, so the new tags file will be taken into use.)
The drawback with caching is that you can only have one tags file on each project. (The cached tags file has the name of you project added to its name, so each project has a separate cached tags file.)

Wildfile

When running Wildfilew.vdm in ClearCase virtual file system, it spends quite a long time collecting filenames from the directory structure. To speed up multi-file search, you can use previously generated file lists.

Each time you run Wildfilew.vdm, it generates a file list in your USER_CFG directory. There is one file list for each search number (wfile1.lst, wfile2.lst ...). You can use these files directly, or you can rename or move the files in order to use them later.

To use a file list, enter @ as first character in the filename field of wildfilew.vdm. If you enter just a the filename (e.g. @wfile1.lst), the file is first searched from current directory and then from USER_CFG directory. If you want to use some specific file in another directory, enter the full path to the file. Or you can browse for the file list by clicking on the [@FileList...] button in the Full Dialog of Wildfilew.vdm.