PowerAda Customizing the Configuration Management Integration

From OC Systems Wiki!
Jump to: navigation, search


When PowerAda is initially installed, it is set up to integrate with a specific Configuration Management tool (or possibly with none). If this setup meets your requirements, you may skip this section. On the other hand, you may want to read this if:

  • You want to add to or modify the CM menus in Powerada
  • You want to change or enhance the behavior of one of the CM operations
  • You want to customize Powerada for a Configuration Management toolset we haven't shipped an integration for
  • You want to provide a different Configuration Management environment for different users

Depending on your own level of experience and the complexity of the task you are contemplating, you may wish to consider contacting OC Systems for support. This section will explain the workings of the CM integration, but because your installation requirements are somewhat unique, we are unable to anticipate every possible setup.

The procedure for customizing the CM integration is very similar to that described in "Customizing the Tools Menu", which you should read before proceeding further.

General CM Customization Issues

These are the differences between the Tools menu customization and CM Customization:

1. The UIL file is named cm.uil and is compiled as follows:

uil tools.uil -o tools.uid

2. Instead of modifying the tools_pulldown object you will modify

cm_pulldown : XmPulldownMenu {

3. The command to be executed is specified in double quotes following cm_menu_activate (not tools_menu_activate), and is not the exact name of the command. Instead, the command to be executed is formed by prepending pacm_ and appending .sh to the term in quotes. For example, if the menu action is specified as:

procedure cm_menu_activate("extract");
then the command executed is:
pacm_extract.sh

4. CM command scripts provided with PowerAda are located in

$POWERADA/../tools/bin/pacm

Working with the PACM/DtKsh Framework

The PowerAda CM dialogs are implemented in the DeskTop Korn Shell (dtksh), a component of AIX's Common Desktop Environment (CDE) which is documented in Info. dtksh is a scripting language which incorporates X11 and Motif commands into the ksh command language. On Linux, the CM menus are built using GTK-Perl.

The CM dialogs use a set of common functions defined in the script pacm_gp.sh, located in $POWERADA/../tools/bin/pacm. These functions are not documented, but simple dialogs can be constructed by using the delivered scripts as examples. However, the behavior of these functions may change in future releases of PowerAda. Contact OC Systems support if you have concerns about using this framework to construct your own dialogs.

Customizing for a New CM Toolset

You may wish to integrate PowerAda with a different CM Toolset than those provided, for example if your CM tools are proprietary to your company and not available for OC Systems to work with. In order to do this, you must observe the following requirements.

1. Define pacm_cm_system in UIL

Every CM UIL file must contain a declaration of the form

value
pacm_cm_system: exported "CMVC";

The string in double quotes is assigned to the environment variable PACM_CM_SYSTEM when Powerada starts up. This variable is used by certain CM scripts to perform different operations for different CM systems. You should assign a string which uniquely identifies your Configuration Management toolset. By convention, this string is lower-cased and appended to the names of the UIL and UID files, for example:

cm.uil.cmvc cm.uid.cmvc

(In the default PowerAda installation, cm.uid is a soft link to a UID file whose name denotes the configured CM toolset.)

2. Define Required CM Operations

Powerada performs some CM operations non-interactively. These are Checkin, Extract and "get CM info". You need to provide the following commands to support these actions, and they must support at least the following syntax:

pacm_extract.sh -n project/relative/path.name
pacm_checkout.sh -n project/relative/path.name
pacm_gotten.sh -n

Each command should return 0 for successful completion and non-zero if the command could not be completed. Checkout and Extract should retrieve the most recent version of a file from the CM system (with or without the file being locked, respectively) to the appropriate directory in the user's working project.

Gotten should print information to standard output describing the state of certain files in CM. Typically, this information describes what files are checked out, but any data may be provided. The information printed will appear in the "CM Info" column of the Powerada directory browser. The output should consist of pairs of lines, with the project-relative pathname of a file on odd-numbered lines, and the information associated with the file on the following even-numbered line. Powerada does not require that any information at all be provided; Gotten can produce no output, or output for any subset of files within a project.