Chapter 8. Using the ClearCase/SoftBench Integration

This chapter describes ClearCase support for the SoftBench integrated software development environment. The ClearCase Encapsulation for SoftBench enables integration of ClearCase with all SoftBench tools. ClearCase services and broadcasts all the messages prescribed for configuration-management systems in the document “CASE Communique: Configuration Management Operation Specifications” from the “historical” standard.

ClearCase adds a menu to the SoftBench Development Manager, providing users with a familiar interface to ClearCase's most important version-control and configuration-management functions. You can customize the SoftBench environment to add items to this menu, accessing more sophisticated features.

You can configure the SoftBench Builder to use the ClearCase build tool, clearmake. All other SoftBench tools (debugger, browser, static analyzer, and so on) work within ClearCase environments by using view-extended pathnames.

ClearCase can broadcast SoftBench messages whenever ClearCase performs a configuration-management operation, no matter how that operation was requested: from the SoftBench or ClearCase graphical user interface, from the ClearCase command line interface, from the ClearCase API, from other SoftBench tools, and so on. This flexibility accommodates a variety of working styles without sacrificing tool integration.

Architecture

SoftBench tools communicate with ClearCase through the SoftBench Broadcast Message Server (BMS), and two ClearCase processes:

  • clearencap_sb — ClearCase Encapsulator for SoftBench

  • sb_nf_server — ClearCase Notice Forwarder for SoftBench

When a SoftBench tool makes a configuration-management request, such as checkout, the BMS receives the message and passes it on to the ClearCase encapsulator, clearencap_sb. The BMS starts the encapsulator process if it is not already running. clearencap_sb then evaluates the message and invokes the appropriate ClearCase operation, such as a checkout command:

  • If the operation succeeds, the individual ClearCase tool sends a message to the Notice Forwarder process, sb_nf_server, starting it if necessary. (For example, cleartool might send notice of a successful checkout.) sb_nf_server then informs the BMS that the operation succeeded.

  • If the operation fails, the BMS receives the message directly from clearencap_sb.

In both cases, the BMS passes the final status message back to the SoftBench tool. This “alternate path” architecture for sending success and failure statuses to the BMS enables ClearCase events to generate SoftBench messages without using the encapsulator. For example, you can perform a checkout command in a non-SoftBench shell, and still have your SoftBench processes be notified that the checkout succeeded. See “One-Way Messaging” for more information on this topic.

Configuring the Development Manager for ClearCase

To include the “ClearCase” menu item in the SoftBench Development Manager Main menu, place this line in your X Window System resources file (typically, $HOME/.Xdefaults):

Softdm*menuDirSelect_CM: ClearCase

Configuring HP VUE

If you are using HP VUE with SoftBench, you must add the $ATRIAHOME/bin directory to your Vuelogin*userPath resource. Edit the file /usr/lib/X11/vue/Vuelogin/Xconfig to include a line like:

Vuelogin*userPath: /usr/bin/X11:/bin:/usr/bin:/etc: \ 
/usr/contrib/bin:/usr/atria/bin:/usr/lib:/usr/lib/acct

Using SoftBench

The sections below discuss various topics pertaining to day-to-day usage of the ClearCase Encapsulation for SoftBench.

Using the SoftBench Development Manager

The SoftBench Development Manager is a graphical browser and file manager. The ClearCase installation procedure adds a “ClearCase” submenu to the Development Manager menu:

Check Out ... 


Sends a CM VERSION-CHECK-OUT message to the ClearCase Encapsulator. This pops up a window in which you specify a (multiline) checkout comment, then checks out the selected element.

Cancel Check Out ... 


Sends a CM VERSION-CHECK-IN message with the CANCEL keyword to the ClearCase Encapsulator. This pops up a window, in which you can specify that the view-private copy is to be saved (uncheckout –keep option), or to be removed (uncheckout -rm option); then, the checkout of the selected element is cancelled.

Check In ... 


Sends a CM VERSION-CHECK-IN message to the ClearCase Encapsulator. This pops up a window, in which you specify a (multiline) checkin comment, then checks in the selected element. Specifying no comment preserves the checkout comment, if any.

Cleartool List ... 


Sends a CM VERSION-LIST-DIR message to the ClearCase Encapsulator. This pops up a window that lists the particular version of the selected element that appears in the view. The configuration rule that selects this version is also listed.

List Checkouts ... 


Sends a CM VERSION-LIST-CHECKOUTS message to the ClearCase Encapsulator. This pops up a window that lists the selected element's checkout records (if any).

List History ... 


Sends a CM VERSION-SHOW-HISTORY message to the ClearCase Encapsulator. This pops up a window showing the event history of the selected element. For directory elements, the history of the directory's contents is displayed, rather than the history of the directory element itself.

Display Version Tree ... 


Sends a CM VERSION-SHOW-VTREE message to the ClearCase Encapsulator. This pops up an xlsvtree window showing a graphical version tree of the selected element.

Describe ... 


Sends a CM VERSION-DESCRIBE message to the ClearCase Encapsulator. This pops up a window that lists information on the particular version of the selected element that appears in the view.

Compare Versions ... 


Sends a CM VERSION-COMPARE-REVS message to the ClearCase Encapsulator. This opens an xcleardiff window that compares the predecessor version of the selected element with the version that appears in your view.

Merge Versions ... 


Sends a CM VERSION-MERGE-REVS message to the ClearCase Encapsulator. This pops up an xcleardiff window, in which you perform the merger interactively.

Make Element ... 


Sends a CM VERSION-INITIALIZE message to the ClearCase Encapsulator. This pops up a window, in which you specify an element-creation comment, then checks in the selected file as the first version of a new element.

Make Directory ... 


Sends a CM VERSION-MKDIR message to the ClearCase Encapsulator. This pops up windows, in which you specify a directory name and an element-creation comment; then, a new directory element is created.

Make Branch ... 


Sends a CM VERSION-MAKE-BRANCH message to the ClearCase Encapsulator. This pops up a window, in which you specify a branch name (the branch type must already exist) and a (multiple-line) branch-creation comment; then, a branch is created in the selected element and version 0 on the branch is checked out.

Make Label ... 


Sends a CM VERSION-MAKE-LABEL message to the ClearCase Encapsulator. This pops up a window, in which you specify a version label (the label type must already exist); then, a version label is attached to the version of the selected element that appears in your view.

Make Attribute ... 


Sends a CM VERSION-MAKE-ATTRIBUTE message to the ClearCase Encapsulator. This pops up windows, in which you specify an attribute name (the attribute type must already exist) and a value for the attribute; then, an attribute is attached to the version of the selected element that appears in your view.

Cat Configuration Record ...

Flattened Cat Configuration Record ... 


Sends a CM DERIVED-CAT-CONFIG-REC message to the ClearCase Encapsulator. This pops up a window that lists the contents of the config rec for the selected derived object.

Compare Configuration Records ...

Flattened Compare Configuration Records ... 


Sends a CM DERIVED-DIFF-CONFIG-REC message to the ClearCase Encapsulator. This pops up a window, in which you specify the DO-ID of a derived object; then, the contents of that derived object's config rec are compared with those of the selected derived object.

Start View ... 


Sends a CM START-VIEW message to the ClearCase Encapsulator. This pops up a window, in which you specify a view-tag; then, the view with that view-tag is activated.

Edit Configuration Specification ... 


Sends a CM VERSION-SET-MASTER message to the ClearCase Encapsulator. This pops up a “text widget” window, in which you revise the current config spec.

Using Views

Do not start any SoftBench process from a shell that is set to a view. As you work, use view-extended pathnames to indicate the desired view context(s). For example:

  • To do new development, you might use the “Set Context” selection on the “File” menu to change the current directory to /view/jones_vu/proj/libpub.

  • To do maintenance work, you might use the “Set Context” selection on the “File” menu to change the current directory to /view/r1fix_vu/proj/monet/include.

Before referencing files in a particular view, make sure that the view is started, using “Start View”. Attempting to start a view that is already started generates a harmless error message.


Caution: Do not attempt to communicate with SoftBench servers on other hosts using view-extended pathnames. This may cause NFS deadlocks.


Setting the Build Program

By default, the SoftBench softbuild(1) program (invoked with the “Build” or “Rebuild” selection on the “Action” menu) runs make(1). You can have it run clearmake by setting two X resources in your .Xdefaults file (typically, in your home directory):

*buildProgram    : clearmake
*knownBuildProgs : clearmake

As an alternative, you can make the change system-wide by setting these X resources in /usr/softbench/app-defaults/Softdm.

One-Way Messaging

Success messages can be sent from ClearCase to SoftBench, even if the successful operation was not initiated by a SoftBench tool. If environment variable CLEARCASE_MSG_PROTO is set to SoftBench, ClearCase tools will generate success messages, whether or not the operation was initiated by a SoftBench tool. The Notice Forwarder sends the success message to the BMS, even if the encapsulator process, clearencap_sb, is not running.

Error Conditions

Message passing succeeds only if ClearCase and SoftBench processes have the same value for the DISPLAY environment variable. A ClearCase tool generates an error message if CLEARCASE_MSG_PROTO is set, but DISPLAY is not set or is incorrect.

The Notice Forwarder process logs errors, warnings, and other messages in file /usr/adm/atria/ti_server_log.

ClearCase Encapsulation Summary

The ClearCase pull-down menu (described in “Using the SoftBench Development Manager”) provides access to a subset of the message-handling capabilities of clearencap_sb. For a complete listing, see the softbench_ccase manual page.

Customization

This version of clearencap_sb conforms to the CASE Communique: Configuration Management operation specification (the one marked “historical”). You can customize the SoftBench environment to access additional features of the ClearCase encapsulation. See the Hewlett-Packard SoftBench Encapsulator: Programmer's Guide for details.