Tools Guide



Chapter 14   SilverStream Source Control

SilverStream Source Control enables you to manage different versions of the objects you are using in your applications, such as forms, views, pages, and business objects. Before you can use Source Control on your system, you must first have one of the following source control software packages installed:

This chapter describes the following:

About source control   Top of page

A source code control system can do several things for you:

Using Microsoft Visual SourceSafe   Top of page

If you are using Microsoft Visual SourceSafe as your source control program, first do the following:

Setting up your connection to Visual SourceSafe   Top of page

First, you need to make sure you can access the Visual SourceSafe server and database from your machine.

To access the Visual SourceSafe server and database:

  1. Open the Visual SourceSafe application.

  2. Select File>Open SourceSafe Database. The Open SourceSafe database dialog box appears.

  3. If the database you want to use is not listed, press the Browse button and select the directory.

  4. Select srcsafe.ini and press OK.

Now you are ready to use SilverStream Source Control. Go to Setting up SilverStream Source Control.

Upgrading to Visual SourceSafe version 6   Top of page

If you have been using SilverStream Source Control with Visual SourceSafe version 5 and have upgraded to Visual SourceSafe version 6, do the following to upgrade your SilverStream Source Control.

To upgrade to SourceSafe version 6:

  1. In the Main Designer, select the database now under source control with Visual SourceSafe version 5.

  2. Select Source>Disconnect from source control and click OK in the confirmation dialog.

  3. With the database still selected, select Source>Source Control Settings.

  4. Specify Microsoft Visual SourceSafe 6.0 and click OK.

    The dialog containing source control settings displays. The settings should be correct because they are taken from your Visual SourceSafe 5 setup.

  5. Click OK.

    Your database is now set up to use source control with Visual SourceSafe 6.

To set up additional databases under source control, see Setting up SilverStream Source Control.

Setting up SilverStream Source Control   Top of page

Once you install your source control software on your machine, use the following procedure to set up source control within the SilverStream Designer. You set up Source Control on a per-database basis.

To set up Source Control:

  1. Select the database that you want to add to Source Control in the left pane of the SilverStream Designer.

  2. Choose Source>Source Control Settings. A list box appears that contains the names of the source control packages that SilverStream supports.

  3. Select the source control package that you have installed on your system and press OK. The Source Control Setup dialog box appears.

  4. For Visual SourceSafe, enter:

  5. Click OK.

What happens

The Designer workspace updates. There is now an SC Status column that indicates whether a file has been checked into or out of the source control system. There is also a User column that shows who has a file checked out.

Also, additional icons appear, which you can use to get files, check files out and in, undo a check out, and look at an object's history.

Icon

Description

Get

Check out

Check in

Undo check out

History

NOTE   You must set up Source Control for each database you add to the SilverStream Designer.

Adding items to Source Control   Top of page

When you activate Source Control on a database within SilverStream, the items contained in that database are not automatically added to Source Control. You can add items (one at a time) to Source Control.

To add an item to Source Control:

  1. Select the plus sign next to the database you added to Source Control to expand its list of items. The item list appears in the right pane of the SilverStream Designer.

  2. Select the object that you want to add to Source Control.

  3. Add the item to Source Control by selecting the Check In icon from the action gallery at the bottom of the right pane of the SilverStream Designer, or select Check In from the Source menu. The Check-In dialog box appears.

  4. Add any comments you feel are appropriate and click OK.

What SilverStream does

Source Control creates a SilverStream subdirectory within the project directory you specified when you set up Source Control.

Within the SilverStream subdirectory, Source Control creates individual directories that are named according to the type of item you are adding.

For example, if you are using Microsoft Visual SourceSafe as your source control package and you specify the following as your project directory:

  $/Test/Release1 

when you add the page candidates.html by checking it in, Source Control creates the following structure in SourceSafe:

  $/Test/Release1/SilverStream/Pages/candidates.html 

Working with objects under Source Control   Top of page

Once an object is under Source Control, only one person at a time can check out that object to update it. However, any number of people can run the object or open the object for viewing (get the object) in the Designer.

When you open an object under Source Control without checking it out, SilverStream creates a copy of the object (you can see that it is a copy by looking at the title bar in the Designer). If you try to save the object, you are prompted to specify a new name.

Checking items out   Top of page

To check items out of Source Control to edit them:

NOTE   Only one person at a time can check a file out.

  1. Select the checked-in item in the Silverstream Designer.

  2. Select the Check Out icon from the action gallery or choose Check Out from the Source menu. Your user name appears in the User column in the right pane of the SilverStream Designer.

    You can now update the object.

Checking items back in   Top of page

To check items back into Source Control:

  1. Select the checked-out item in the Silverstream Designer.

  2. Select the Check In icon from the action gallery or choose Check In from the Source menu. A dialog displays.

  3. Enter any comments you want to make about the new version of the object and click OK.

    The item is checked back into source control and your name is removed from the User column for the object.

Performing a Get   Top of page

To get the most recent version of an item stored in Source Control:

  1. Select the item in the SilverStream Designer and choose the Get icon from the action gallery.

    The Get popup menu displays.

  2. Select one of the following:

Getting an item from ClearCase

Before you get an item in a snapshot view in ClearCase, you need to update your view in Windows Explorer. If you do not update the view first, you will not get the latest version of the item.

Doing a build after performing a get

Whenever you do a Get from source control, you should use the Build command to compile the code. For more information, see Using the Build command.

Viewing item history   Top of page

To view the history of an item:

  1. Highlight the item and click the History icon in the action gallery.

    The History dialog appears. It contains a listing of each version stored in the source control system.

  2. If you want to get (not check out) a version, select the version and click Get.

Disconnecting from Source Control   Top of page

At any time, you can disconnect a database from Source Control. For example, if you are working on a laptop and taking your machine home, you would disconnect from Source Control before disconnecting from the network.

To remove Source Control from a database:

  1. Select the database and the items within the database that you want to disconnect from Source Control.

  2. Select Disconnect from Source Control from the Source menu in the SilverStream Designer. The following message appears.

      Are you sure you want to disconnect this database from the source control system? 
    
  3. Select OK to disconnect from source control or Cancel to retain the connection.

Once you are back on the network, you can reconnect the database to Source Control, as described in Setting up SilverStream Source Control. Then you can check in your changes.






Copyright © 2000, SilverStream Software, Inc. All rights reserved.