[Top] [Prev] [Next] [Bottom]

Chapter 5: Working in a Project

This chapter describes how a project member works in a project and how he/she develops and maintains the files in the systems dealt with by the project.

The description is an example, using a project (smarter) connected to two systems (square,
CompareVersion). These are described in Chapter 3. This example describes John's work in the project. The files in the example are very simple, they just describe the principles.

This chapter assumes that the project administrator (Paul in this example) already has performed the steps described in Section 4.1 - Section 4.2, for example created the necessary Make include files on system level.

5.1 Setting the Project Environment

Before John can do any work in the project, he must set up the environment for the project. This is done from Softbench - SDE Control Panel.

  1. John starts SDE Control Panel from a terminal window by giving the command sde.
  2. Fig 5.1 Softbench - SDE Control Panel

  3. To set up the project environment, John chooses Add Project Session... from the Add menu. The window in Figure 5-2 is opened.
  4. Fig 5.2 SDE Control Panel - Add Project Session

  5. John selects the project smarter and clicks on the button Add to List. A new session line then appears in the Sessions list of SDE Control Panel.
  6. John closes the Add Project Session window with the Close button, it is not needed any more.
  7. The first time John sets up the project environment, he wants to create all subsystems for configuration 1.0-0 in his project work structure, so he selects the smarter session line and chooses Create Project Directories... from the Selected menu. When John clicks OK in the displayed dialog box, the project environment is set up. John can follow what happens in a message box, and when all directories are created he closes the message box.
  8. John double-clicks the smarter session line in SDE Control Panel and the SDE Control Panel - Tools window appears.
  9. Fig 5.3 SDE Control Panel - Tools

  10. John decides to start VersionWorks, so he double-clicks the line SDE VersionWorks. After the project environment is set up, John closes the Tools window, it is not needed any more.

5.2 SDE VersionWorks

When the project environment is set up, an SDE VersionWorks window is created (see Figure 5-4).

Fig 5.4 VersionWorks

The RCS libraries in the subsystems are empty, no files will be shown, only the directory tree. On configuration level there exists two files.

John can easily walk around in this tree, by clicking on the subsystem directory he wants to go to. SDE VersionWorks also starts a Softbench Development Manager window (Figure 5-5), where the current directory is the selected subsystem.

The project team has decided to use Change Requests (CRs) to describe all changes in the project files, as default the project start-up file sets the environment variable SDE_CR_CI to ON. )

Fig 5.5 Softbench Development Manager

When John works in the project he always has VersionWorks started in the configuration he works in, to be able to have a view of the checked in files. From VersionWorks the RCS information for each file can easily be seen and also be changed if necessary. VersionWorks also provides easy access to Softbench Program Builder in the currently selected subsystem.

5.3 Create the Application

John uses Softedit to edit the files in the smarter project.

5.3.1 Math Subsystem

John creates the files in the subsystem Math. He creates the files Math.H (Figure 5-6) and Math.C (Figure 5-7).

Fig 5.6 Math.H

Fig 5.7 Math.C

5.3.2 Makefile for Math Subsystem

To build the application John needs a Makefile, which he creates.

  1. John starts Softbuild from VersionWorks from the menu File, the item Program Builder. The window in Figure 5-8 is opened.
  2. Fig 5.8 Program Builder

  3. John creates the Makefile from Softbuild, he chooses the item Create/Modify Library Makefile... from the menu Makefile. A dialog box is displayed.
  4. Fig 5.9 Create library

  5. He fills in the menu as Figure 5-9 shows and clicks OK. John calls the library he creates libmath.a. LD is set to $(CXX). Compiler Include Directories are left empty because no other include directories are used. LIBS is also cleaned. Parts of the generated Makefile is shown in Figure 5-10.
  6. Fig 5.10 Makefile

  7. When the Makefile is completed John builds the Math library from Softbuild by clicking on the button Build (Figure 5-8), the result is libmath.a. This library will be used by the application in the square subsystem.

5.3.3 Square Subsystem

John develops main.C in the square subsystem, it uses the Math library (in the Math subsystem), the version library (in the CompareVersion system, include file Version.H), but also the external product c++ complib.

The file main.C is shown in Figure 5-11.

Fig 5.11 main.C

5.3.4 Makefile for Square Subsystem

To create the program sqr John needs a Makefile in the square subsystem.

  1. He repositions Program Builder to the square subsystem, by selecting it in SDE - VersionWorks and choosing File; Program Builder again.
  2. He creates this Makefile from Softbuild (see Figure 5-8), he chooses the item Create/Modify Makefile... from the menu Makefile. The dialog box in Figure 5-12 is displayed.
  3. Fig 5.12 Create Makefile for sqr program

  4. John's program is called sqr, the different object libraries (LIBS) must be filled in, and the Compiler Include Directories as well (see Figure 5-12).
  5. He clicks OK and the Makefile is generated. Parts of the contents of the Makefile is shown in Figure 5-13.

    Fig 5.13 Makefile for sqr

5.4 Managing the Files

This section describes shortly how to manage files in the RCS libraries.

5.4.1 Create Initial Version

When John can build the libmath.a, he checks in the files in the RCS library in the subsystem Math.

  1. He selects the working files view from SDE VersionWorks with the action Working Files in the menu View. John selects the files he wants to check in.
  2. Then he chooses the action Create Initial Version from the menu RCS. The dialog in Figure 5-14 is shown.
  3. Fig 5.14 Create Initial Version

  4. John uses the default comment for the first version of the files.
  5. He has to connect the check in action to a Change Request (CR).

  6. John selects the createMath CR. When he clicks OK the files are checked in, and the files are connected to the selected CR.

When the files are checked in he can see them in the Subsystem View listing in VersionWorks. John sees the current version number of each checked in file, the state and the author (see Figure 5-15).

Fig 5.15 VersionWorks with checked in files

5.4.2 Checkout - Checkin

John finds an error in the file Math.C. To correct the error he must check out the file to be able to edit it.

  1. He selects the file in the VersionWorks window, and chooses the action Check Out... from the RCS menu. The dialog box in Figure 5-16 is displayed.
  2. Fig 5.16 Check out file

  3. He clicks on Lock, to lock the file so no one else can edit it.
  4. When the error is corrected, John checks in the corrected version of the file. He selects the file in the VersionWorks window, chooses the action Check In... from the RCS menu.
  5. Fig 5.17 Check in file

  6. John writes a message to document the change he has made in the file. (Figure 5-17). He also sets the state Stable on the file, because the file Math.C is ready for integration.
  7. John selects the CR createMath and clicks OK. The file is checked in and added to the CR.

5.4.3 Release Preparations

When Paul says it is time to integrate the system, John must check if he has any locked files and any files, which are not marked for integration (unstable files). John uses SDE - VersionWorks to check these things.

  1. To see his locked files he chooses Find My Locked Files from the Search menu. A window showing all locked files is popped up.
  2. He checks in locked files, if they are completed.
  3. To easily position to the locked file, he selects it in the window and clicks on the Go To Subsystem button. SDE - VersionWorks is repositioned to the correct subsystem, the file is selected and can easily be checked in with the action RCS; Check In... from the VersionWorks window.
  4. To see his unstable files he chooses Find My Unstable Files from the Search menu. A window showing all unstable files is popped up.
  5. John marks the unstable files as Stable, if they are ready for integration, see Section 5.4.4.
  6. John checks his CRs against the files. He does this from SDE - CR Manager, where he chooses Check; Check My CRs. He can then study the relations between the CRs and the files in a window.

5.4.4 Set State Stable

To mark that files are ready for integration the project has decided that the files should have the state Stable.

To set the state Stable on the file Math.H, John uses SDE VersionWorks.

  1. He selects the file Math.H in the subsystem view, and chooses the action Change Version State... from the menu RCS. The dialog box in Figure 5-18 is displayed.
  2. Fig 5.18 Change Version State

  3. John turns on the Stable state.
  4. He clicks OK and the state is changed for the file.

5.4.5 Documents

In the doc subsystem John and Anne writes some FrameMaker documentation. When the FrameMaker files are checked in into the RCS libraries, they should be checked in as Binary (see Figure 5-14).

John forgets to check it in as a binary file, to chang it to binary he changes the keyword substitution to binary file. If he does not, the file contents can be damaged when the files are checked out again. John uses VersionWorks to change the keyword substitution on the checked in documents.

  1. He selects a document file in the subsystem view and chooses Change RCS Attributes... from the RCS menu. The dialog box in Figure 5-19 is displayed.
  2. Fig 5.19 Change RCS Attributes

  3. The keyword substitution for documents should be b, so he clicks on the button Binary file (-kb).
  4. When John clicks OK the keyword substitution is changed.

5.5 Manage CRs

This section shortly describes some general CR functions. The actions in this section are performed from SDE CR Manager. The main window of SDE - CR Manager is shown in Figure 5-20.

Fig 5.20 SDE CR Manager

5.5.1 Display Contents of a CR

John wants to see the current contents of the CR createMath.

He double-clicks on the CR in the SDE - CR Manager window.

The result is shown in Figure 5-21.

Fig 5.21 Display CR

5.5.2 Create CR

John must create a new CR so some more functionality can be added to the function. He creates the CR moreFuncInSquare.

  1. He chooses the action CR; Create... and fills in the dialog box in Figure 5-22.
  2. Fig 5.22 Create CR moreFuncInSquare

  3. When he clicks OK the CR is created. He sees the name of the created CR in the main window.

5.5.3 Edit a CR

John is not content with the description of the CR createMath, he wants to add some things to it.

  1. He selects the CR and chooses the action CR; Modify; Edit.... He adds some text to the description in the displayed dialog box (Figure 5-23). He does it by editing the CR Description area.
  2. Fig 5.23 Edit CR

  3. He clicks OK and the CR is updated.

5.5.4 Terminate a CR

When John has completed the work with the CR createMath he must terminate it.

  1. He selects the CR, and chooses the action CR; Terminate.... The dialog box in Figure 5-24 is displayed.
  2. Fig 5.24 Terminate CR

  3. He clicks OK and the CR is terminated.
  4. John checks the contents of the CR, sees that the status of the CR is Term and that the current date is set as termination date.

5.6 Work in a New Work Configuration

When Paul has created a new configuration intended for work (work), John starts to work in this configuration.

[Top] [Prev] [Next] [Bottom]