RADE

Workflow Management

Working with the RADE Dashboards and SCM

Source Code Manager features in the dashboards

Technical Article

Abstract

This article describes the use of Source Code Manager (SCM) commands available in Visual Studio 2005, other commands (specially mkmk and related functionalities) are explained in another topic: Principles of use - How to open and build a CAAV5 workspace.

If you work with the C++ Interactive Dashboard and your environment has not been set up for CAAV5 tools, read Customizing Visual Studio 2005.

Finally, if you are familiar with CAAV5 commands, Workbench commands mapping will give you the correspondences between DOS/shell commands and Visual Studio 2005 menus and windows.

Conventions: In the rest of this paper, labels of menus or window items are written using "this format".


Getting Started

Even if they appear in Visual Studio 2005 menus, Source Code Manager commands do not work until you open a workspace which is managed by it.

If you try to use them before opening a workspace, you will get the following message:

There are three situations to study:

Opening a Workspace

From the File menu, select Open CAA V5 Workspace....

The following window appears. Select Mkmk & Source Code Manager in the combo box to make active the last three fields.

Opening a workspace this way means that you can access mkmk commands (instead of the Mkmk choice which does not give access to Source Code Manager commands).

After entering the name of your workspace and the tool level, click OK. A log window appears while your environment is updated and the workspace opened. When this window has disappeared, Visual Studio 2005 loads the project files it stored in your workspace and you are ready to work.

How to Work...

Source Code Manager commands are useful for workgroup support, that is, when several people work on the same software and need to share their files. Using the Source Code Manager, each person creates its workspace, all workspaces declared in a base are organized in a tree whose top is called BSF, intermediate levels are typed "project" and leaves are "development" workspaces. The commands which are available from the dashboard are those needed in this kind of workspace, if you need other commands you can open a DOS window in which you can run any of them from the workspace currently opened in Visual Studio 2005. From the Window menu, select Open Command Window.

Locally in Your Workspace

When working with the Source Code Manager, any action performed on the content of the workspace file system must be declared - registered in a repository - to the Source Code Manager:

Declaring New CNext Directories

New CNext directories must be declared only if they have been created in your workspace, not if they have been copied from another workspace (because they might have been already declared from this other workspace). From the CAA V5 Source Code Management menu, select Declare Directory in Database..., then use the file tree displayed and select the directories to register with corresponding check buttons.

  • If you declare a new Module (see figure above) in a new Framework, do not forget to declare the embedding framework too.
  • A directory can be registered by only one person, other people must get a copy of it by selecting Attach Frameworks/Modules... in menu CAA V5 Source Code Management.
Declaring New Files

Like for directories, files created in your workspace must be registered in the Source Code Manager repository, to do so, from the CAA V5 Source Code Management menu, select Declare File in Database....

When you click OK, a log window is displayed while the files are being registered. After the completion the selected files are no more writable except if you clicked on the Check-out file(s) check box, in this case each file is checked-out after its registration, so you can continue to work on it.

Any (source) file needed to build a component must be declared to the Source Code Manager because the tool doesn't browse your file system to find what has been created, modified or deleted. If you want to know if all has been registered you can ask the Workspace Manager to check your file system.
Deleting Files

Any file or directory can be removed from any workspace. However, considering the deletion of component is not a task devoted to developers, no command to remove a directory has been provided through Visual Studio 2005.

Note that the deletion of any data will be propagated to other workspaces, if you just want to clean up your workspace use Detach Frameworks/Modules... instead available from the CAA V5 Source Code Management menu. Note also that you must use Source Code Management commands to remove data from your workspace because it will detect inconsistencies if you do not do so.

To delete, from the CAA V5 Source Code Management menu, select the Move/Rename/Remove sub-menu, and select Remove a File... The file which is automatically selected is the one currently edited in Visual Studio 2005. You can select files in the file tree.

Moving Directories or Files

You can move and rename a directory or a file using the same command. From the CAA V5 Source Code Management menu, select the Move/Rename/Remove sub-menu, and select Move/Rename...

Moving a file or directory

Select the file or directory to move, "drag & drop" it to the destination directory, or use the Cut and Paste contextual menu commands.

Renaming a file or directory

Select the file or directory to rename, and click once more to be able to modify the name, or use the Rename contextual menu command.

Modifying Existing Files
Check-Out

Before modifying a file, check it out from the Source Code Management repository, the main interest being to indicate that this file is being modified and that any further command should take care of it:

To check-out a file, open menu CAA V5 Source Code Management and select Check-Out.... The current edited file is selected by default. As you may want to check-out several files at the same time you can select several files in the file tree.

 

It is possible to check-out a file in a special mode named private. In this case, the file can be modified but the system will prevent you from delivering this file. For instance, when you want to modify some files for debug purposes, you do not want these modifications to be promoted with other normal modifications. To do this, from the CAA V5 Source Code Management menu, open the Private Files sub-menu and select Check-Out Private File. The file which is currently edited will be checked-out in private mode.

Check-In

You can check-in one or more SCM objects at the same time. This command checks-in the official acquisitions of the current image of the current workspace. You can record intermediate states of files in a workspace, in the database, without making a photo or promoting the workspace to the parent workspace.

To check-in one or more file(s), open menu CAA V5 Source Code Management and select Check-In.... The current edited file is selected by default. As you may want to check-in several files at the same time you can select several files in the file tree.

 

Checking Your Workspace Against Database

The purpose of checking your workspace against the (Source Code Manager) database is to detect files which are not yet managed or which have been edited without being checked-out. This command helps you prepare your workspace to be delivered to other people because only modifications declared to the Source Code Manager will be delivered afterwards.

From the CAA V5 Source Code Management menu, select the Information sub-menu, and select Check Workspace.... A dialog box is opened in which you can select one or more framework to check, which can be useful for a workspace containing many frameworks.

Check messages are displayed in the Mkmk output window that lets you run omitted commands without losing these traces. The detected errors are:

The appropriate actions to fix these errors are:

  1. Declare missing files in database using Register file in database...
  2. Extract the file from the database by projecting the embedding directory, consult the adl_project reference page
  3. Change the file mode using Windows commands

This might show that you modified this file without checking it out, check it now:

Restoring an image from the Database

You can restore an existing SCM Object, i.e. a framework, a module, a directory or a file from the database. To restore one or more SCM object(s), open menu CAA V5 Source Code Management and select Restore Image from Database.

You can also restore a whole Workspace along with its projection information similar to the adl_restore_image -all_fw –format SCM command.  To do so the Reformat the projection Information (Toolsdata\ProjectionInfo) must be checked. In this case the Tree-file is grayed-out. Note that when selecting a directory, all the SCM objects within are recursively restored.

Importing changes from another workspace

You can import changes from an existing Workspace.

To import one or more changes:

  1. Click Import changes from another workspace from the  CAA V5 Source Code Management menu. The Import dialog box is displayed.

  1. Type or select the origin Workspace in the Origin Workspace field.
  2. Click OK to validate your selection. The selected changes will be imported to your target workspace.

Note that this command can result in merges to solve.

This command works recursively (unlike the underlying SCM command: if a directory is selected, the SCM command adl_import will be launched for the directory itself and all of its sub-elements).

Checking-Out modified files

You can check-out files that you have just modified.

To check-out one or more files:

  1. Modify one or more file(s).
  2. Click Check-Out modified files... from the  CAA V5 Source Code Management menu. The Select File(s) for Check-Out is displayed. The modified file(s) is highlighted.
  3. Click Ok to validate.

With Other People

In the context of working in a development workspace, there are only four commands to know to exchange data with other people. A development workspace has a father workspace and no son, so the only data flow is to or from the father workspace:

These commands do not require any parameter, however particular options can be specified in the common dialog box, consult adl_collect, adl_sync, adl_publish and adl_promote and  reference pages to find out more.

With Multiplatform Workspaces

A multi-platform workspace is a workspace having one database representation and two file system representations: one on a Windows machine and another one on a Unix machine. The way to create such a workspace is broken down into 3 steps:

If we consider the fact that one workspace can have 2 file system representations, it is possible to work on only one platform at a time. When you work on one platform and you need to work on the other one, 2 commands are necessary:

  1. Register the content of your current working workspace using adl_photo or any command which leads to data transfer between workspaces (adl_sync, adl_promote).
  2. Project the files corresponding to this "photo" to the other side:

To run one of these two commands from Visual Studio 2005, open the CAA V5 Source Code Management menu, then open the Unix <-> NT sub-menu, and select Photo... or Refresh....

Getting Information on the Current Workspace Status

This section gathers commands used to obtain information on your current workspace:

Workspace Status

Open the CAA V5 Source Code Management menu, open the Information sub-menu and select Display Workspace Status.... A log window opens and the status is displayed in the Output window (see below.)

Workspace Hierarchy

This command can be used to display the names of existing workspaces and how they are organized. Open the CAA V5 Source Code Management menu, open the Information sub-menu and select List Workspaces....

You can choose to display workspaces "under" or "above" a given workspace or to display workspaces owned by a given user.

It is possible to list "deleted" workspaces because, even if they cannot be used anymore, they still exist in the repository.

List frameworks/module

This command is especially useful to know what are the frameworks and modules that can be attached to the current workspace. Note that a workspace can attach only copies of frameworks and modules which are managed in its father workspace.
Open the CAA V5 Source Code Management menu,  open the Information sub-menu and select List Frameworks... or List Modules....

In the windows, the Attached ... radio buttons correspond to data already present in your workspace while the Visible ... radio buttons allow you to display also what can be attached.

List checked-out or private files

This command lists the files you have checked-out since the last "photo" of your workspace, a "photo" is done each time you ask for it (CAA V5 Source Code Management/UNIX<->NT/Photo...) or when you exchange data with another workspace (promotion, synchronization). Note that the command lists private files too.

Open menu CAA V5 Source Code Management, open submenu Information and select List Checked-Out Files....

[Top]


In Short

[Top]


References

[1] Customizing Visual Studio 2005
[2] Working with the RADE Dashboards - Part 1
[Top]

History

Version: 1 [Jan 2000] Document created
Version: 2 [Jul 2007] Document updated
[Top]

Copyright © 2005, Dassault Systèmes. All rights reserved.