Previous Next Contents Index Doc Set Home


Performing Basic SCCS Functions with Versioning

14


This chapter shows you how to perform basic SCCS functions using Versioning. It is organized into the following sections:

Typical Sessions

page 171

Commands: Manipulating Files

page 174

View Option: Changing Versioning Properties

page 177


Typical Sessions

This section gives an overview of the most common SCCS sessions using Versioning. It assumes that you are familiar with the SCCS. The following scenarios are covered:

Changing Names

The current release of TeamWare uses new command names, so Table 14-1 summarizes the correspondences for you. Note that the old commands still work, however this manual uses the new commands and GUI names.

Table  14-1 New and Old TeamWare Commands

Old Command
New Command
Old Tool Name
New GUI Name

codemgrtool

twconfig, teamware

CodeManager

Configuring

vertool

twversion

VersionTool

Versioning

filemerge

twmerge

FileMerge

Merging

maketool

twbuild

MakeTool

Building

freezepttool

twfreeze

FreezePoint

Freezepointing

Putting a Project Under SCCS Control

There may be instances where a project is under development before a source code control system is put in place. This scenario assumes a project is already under way and the hierarchy of the project is established. It is assumed that the project is ready to be put under SCCS control. The following process shows you how to do so.

1. Bring up Versioning at the top level of the source hierarchy by going to the appropriate directory and entering one of the commands shown in the following two examples:


demo% twversion &



demo% twversion dirname &

2. Double click on the project directory from the list displayed in the base window.

Versioning automatically changes (cd) to the selected directory. As there are no files yet under SCCS control, the display will only show directories.

3. From the Commands menu, choose Check In New.

The Check In New window displays a list of files not under SCCS control.

4. Select the files you want to put under SCCS control and add necessary comments in the Initial Comment pane.

5. Choose the OK button at the bottom of the window to check in the selected files.

Once the files are under SCCS control, they will be transferred to the base window file list display. The Reset button clears the comment pane.

Repeat this scenario in as many project directories as necessary. Then proceed to the scenario in the next section for working with files under SCCS control.

Working with a Project Under SCCS Control

Once a project is under SCCS control, you can use Versioning to perform SCCS functions. This section provides a scenario of basic SCCS tasks and how they might be applied on a project. These steps are simplified to give an overview of the process. The remaining sections of this chapter cover in-depth instructions on performing tasks.


Note - This is representative of a hypothetical session. The steps will vary according to project needs and the tasks required to fulfill them.

1. Bring up Versioning in the working directory.

2. Check out a file.

3. From the View menu, select File History to display the history graph of the file.

4. Select two deltas from the history graph and inspect the diffs.

5. Make changes to the file.

6. Add necessary comments.

7. Check the file in.

These steps can be repeated and varied as required by the needs of your project. The following sections of this chapter provide in-depth information on how to perform these, and other, SCCS functions with Versioning.

Getting Help on the GUI or the CLI

Versioning is implemented in both the GUI and CLI. To use Versioning from the GUI, see the Sun WorkShop TeamWare online help.

To Access the Online Help

1. Open any Sun WorkShop TeamWare GUI from the Sun WorkShop.

2. Or, open any Sun WorkShop TeamWare from the command line. For example, to open the Versioning GUI, enter the following:

demo% twversion &

3. Open the pull-down menu from the Help button.

4. Click on Help Contents.

To Access Help for the CLI

   To access the manual page for information on how to use Versioning from the CLI, enter the following. The manual page gives information on all command-line options, variables, and macros necessary to use DMake.

demo% man twversion.1

To discover what each of the windows and associated buttons do, bring up the GUI as shown above, and access the Help Contents>TeamWare Windows.


Commands: Manipulating Files

You can perform SCCS operations within the file list on a per-file basis or on a multiple-file basis. You can select a single file, or multiple files, on which to perform a function.

The Commands menu allows you to do the following:

Checking Out and Checking In Files

This section covers the process of checking out and checking in files that are already under SCCS control.

Checking Out Files

Two methods for checking out files are as follows:

   Select the file(s) you want to check out from the base window display. Then, choose Check Out from the Commands menu.

A check mark is displayed in the file icon(s) of the selected file(s). This method is valuable when you want to check out several files at once.

   Double click on a file icon in the base window (if set in the Options window).

A check mark is displayed in the file icon and the file is checked out with you as the owner. This is not the default behavior. You must change the default behavior using the View menu Options.

Checking In Files

There are two methods for checking in files:

   Select the file(s) you want to check in from the base window display and choose Check In from the Commands button menu. Enter the appropriate comments in the Check In pop-up window before choosing Check In.

The check mark(s) continue to be displayed on the file icon(s) until you choose Check In from the pop-up window. This method is valuable when you want to check in several files at once and the same comment can apply to each.

   Double click on a checked out file icon in the base window and add the appropriate comments in the Check In window before choosing Check In (if set in the Options window).

The check mark continues to be displayed on the file icon until you choose Check In from the pop-up window. This is not the default behavior. You must change the default behavior using the View menu Options.

Editing a Checked-Out File

This section covers the process of checking out a file that is under SCCS control and displaying it in a window with an editor. The Edit menu item allows you to do this in either of the following ways:

To check out a file and display it in a window with an editor:

   Choose the Check Out & Edit menu item from the Commands menu.

The default is for the file to be brought up in a cmdtool window running vi. For instructions on defining an editor, see "View Option: Changing Versioning Properties.

Checking in a New File

Files that are not under SCCS control are not displayed in the base window. To see what files are in a directory and are not under SCCS control, use the Check In New menu item.

Check In New displays a window that contains a list of files. You can define the list by specifying a pattern in the filter text field.

1. Display a list of files from a directory that are not under SCCS control.

Double click on the directory in the base window, or define the directory path in the Directory text field. Once in the directory, choose Check In New from the Commands button menu. The Check In New window is displayed with a list of files not yet under SCCS control.

2. Check in new files under SCCS control using the Check In New window.

Select the files from the Check In New window display. Enter the appropriate initial comments in the Initial Comments pane before choosing Check In. The checked-in files are removed from the Check In New display and now appear in the base window file list display.

Unchecking Out a File

When you have mistakenly checked out a file and want to return the file to an unchecked out state, there is a simple way to do so without having to check in the file and add comments. This is done through the Uncheck Out option of the Commands button menu.

To uncheck out a file:

   Select the checked out file and choose Uncheckout from the Commands menu.

You will be prompted for confirmation. When confirmed, the file reverts to its previous unchecked-out status, and no comments are required. No record is kept of your owning the file.


View Option: Changing Versioning Properties

The View menu displays a pop-up window with Versioning properties options. Selecting options from this window sets the Versioning properties for the remainder of the session.


Note - You must choose the Apply button before the property selections are activated. Use the Set Default button to save the changes for subsequent twversion sessions.

Changing the Main File List Display

The Main File List category lets you specify the type of SCCS files displayed in the base window file list.

To specify the base window file list display:

   Select one of the following from the Options window:

Defining an Editor

The Editor category lets you specify an editor that automatically comes up when you view the contents of a delta, or bring up a delta to edit. You have the following list of editors to choose from. The last option allows you to specify your own editor.

To specify an editor:

   Select one of the following from the Options window:


Note - With Other:__ you must supply a command that will bring up your editor in a separate window. The file name is tacked on the end of the supplied command.

Note - If you set the EDITOR environment variable to one of the top four selections, Versioning brings up the editor automatically without setting it from the Properties window.

Changing the Double-Click Action

The Double-Click Action category lets you specify what happens when you double click in Versioning.

To specify the results of the double-click action:

   Select one of the following from the Options window:

When you select this option, you can optionally check the Confirm Double Click Check Out option.

Changing the History Graph Display

The History Graph category lets you define items for display on the history graph.

To specify the display of the history graph:

   Select the desired options from the Options window.

These options are toggles that you can turn off or on.

Changing the History Information Display

The History Information category lets you specify the extensiveness of the information displayed when you select a delta on the history graph.

To specify the history information:

   Select one of the following from the Option window:

When you select this option, you can also specify a command to gather the history.




Previous Next Contents Index Doc Set Home