SPARCworks/TeamWare & ProWorks/TeamWare User's Guide
  Buscar sólo este libro
Descargar este libro en PDF

Introduction to VersionTool

11

Coordinating write access to source files is important when changes will be made by several people. Maintaining a record of file updates allows you to determine when and why changes were made.
The source code control system (SCCS) allows you to control write access to source files and monitor changes made to those files. The SCCS allows only one user at a time to update a file, and it records all changes in a history file.
VersionToo lis a GUI to SCCS. Version Tool allows you to manipulate files and perform SCCS functions without having to know SCCS commands. It provides an intuitive method for checking files in and out, as well as displaying and moving through the history branches.
With VersionTool, you can do the following:
  • Check in files under SCCS
  • Check out and lock a version of the file for editing
  • Retrieve copies of any version of the file from SCCS history
  • Visually peruse the branches of an SCCS history file
  • Back out changes to a checked-out copy
  • Inquire about the availability of a file for editing
  • Inquire about differences between selected versions using Filemerge
  • Display the version log summarizing executed commands
VersionTool helps you perform these tasks and expedites the progress of concurrent development projects.
This chapter is organized into the following sections:

Terminology

This section covers the terminology and concepts of SCCS. Familiarity with these terms will help you when working with a project under SCCS control. This terminology applies mainly to SCCS and its ability to keep track of changes to files.

Branches

You can picture the deltas applied to an SCCS file as nodes of a tree with the initial version of the file as the root. The root delta is numbered 1.1 by default. These two parts of the SCCS delta ID (SID) are the release and level numbers. Successive deltas (nodes) are named 1.2, 1.3, and so forth. This structure is called the trunk of the SCCS delta tree. It represents the normal sequential development of an SCCS file.
Situations can arise, however, when it is necessary to create an alternative branch on the tree. Branches can be used, for instance, to keep track of alternate versions developed in parallel, such as for bug fixes.
The SID for a branch delta consists of four parts: the release and level numbers and the branch and sequence numbers, or release.level.branch.sequence. The branch number is assigned to each branch that is a descendant of a particular trunk delta; the first branch is 1, the next 2, and so on. The sequence number is assigned, in order, to each delta on a particular branch. Thus, 1.3.1.1 identifies the first delta of the first branch derived from delta 1.3. A second branch to this delta would be numbered 1.3.2.1 and so on.
The concepts of branching can be extended to any delta in the tree. The branch component is assigned in the order of creation on the branch, independent of its location relative to the trunk. Thus, a branch delta can always be identified
from its name. While the trunk delta can be identified from the branch delta's name, it is not possible to determine the entire path leading from the trunk delta to the branch delta.
For example, if delta 1.3 has one branch, all deltas on that branch will be named 1.3.n. If a delta on this branch has another branch emanating from it, all deltas on the new branch will be named 1.3.2.n. The only information that can be derived from the name of delta 1.3.2.2 is that it is the second chronological delta on the second chronological branch whose trunk ancestor is delta 1.3. In particular, it is not possible to determine from the name of delta 1.3.2.2 all of the deltas between it and its trunk ancestor (1.3).

Deltas and Versions

When you check in a file, SCCS records only the line-by-line differences between the text you check in and the previous version of the file. This set of differences is known as a delta. The file version that you initially checked out was constructed from a set of accumulated deltas. The terms delta and version are often used synonymously; however, their meanings are not the same. It is possible to retrieve a version that omits selected deltas.

History Files

When you initially put a file under SCCS control, a history file is created for the new SCCS file. The initial version of the history file uses the complete text of the source file. The initial history file is the file that further deltas are compared to. Owing to its prefix (s.), the history file is often referred to as the s.file (s-dot-file).

SCCS Delta ID (SID)

A SID is the number used to represent a specific delta. This is a two-part number, with the parts separated by a dot (.). The SID of the initial delta is 1.1 by default. The first part of the SID is referred to as the release number, and the second, the level number. When you check in a delta, the level number is incremented automatically.

Graphical Tour

This chapter is dedicated to provide an overview of the functionality of the VersionTool Base window and control buttons. Included in this discussion are the pop-up windows associated with their buttons. The overview is organized in the following sections:
  • Base Window
  • File Button
  • Load Button
  • View Button
  • Commands Button
  • Show Output Button
  • Props Button

Base Window

The VersionTool base window displays the directories and SCCS files of the loaded directory; the directory path is shown in the Directory text field. Directories are shown as file folders; files are shown as pieces of paper. Files checked out from SCCS are marked with a check mark. Figure 11-1 is an example of a typical base window directory listing.
Directories are shown whether they contain files which are under SCCS control or not. A directory is a container for files and directories and can possibly contain SCCS files and directories further down the hierarchy. Files are only shown in the Base window if they are under SCCS control. To look at the non-SCCS files in a directory, use the Check in New window. For more information, see "Check In New Window" on page 229.

Gráfico

Figure 11-1 VersionTool Base Window


The control buttons at the top of the window provide menus and options for performing SCCS functions. The buttons are described starting with "File Button" on page 220.
The scroll bars at the side and bottom of the window allow you to scroll through, and across, an extensive listing.

Base Window Pop-up Menu

The Base window has a pop-up menu that offers the menu items shown in Figure 11-2. For more information on the base window pop-up menu options, see "Commands Button" on page 228.

Gráfico

Figure 11-2 Base Window Pop-up Menu

File Button

The File button allows you to load and unload files into the base window file list display. The File button menu has the following menu items:

Internal bitmap(502x258)

The Load menu item loads the directory name you type in the Directory text field. A list of previously loaded directories is saved. The Load directory list is the same as the Unload directory list.
The Unload menu item lets you unload a directory. The pop-up submenu displays a list of previously loaded directories. The directory displayed at the top of the list is the currently loaded directory. You unload a directory by choosing it from the display list. For more information on unloading directories, see Chapter 2, "VersionTool Basics."

Load Button

The Load button displays a menu with a list of previously loaded directories. It is the same list displayed under Unload in the File menu. To reload a directory, choose it from the list. For more information on loading directories, see Chapter 2, "VersionTool Basics."

View Button

The View button menu displays the following menu and pop-up submenu:

Gráfico

Figure 11-3

The File History menu item brings up the History window and displays a history graph of a selected SCCS file. For information on the History window, see "History Window" on page 223.
The Command Output menu item brings up a pop-up window that allows you to selectively display the following information:
  • Commands being executed
  • Output of executed commands
  • Errors from executed commands
You can display information types exclusively or in combinations by selecting the appropriate box in the pop-up window header. A check mark is displayed in the box once it is selected.
The Clear button allows you to clear the pane of displayed information. The scroll bar at the side of the output pane lets you peruse an extensive list of displayed information.
Figure 11-4 is an example of the Command Output pop-up window.

Gráfico

Figure 11-4 Command Output Pop-Up Window

The List by File Status menu item brings up a pop-up window that lets you filter the file list display according to status. You have the option of creating a list of:
  • Checked-out files
  • Checked-in files
  • All files (default)

History Window

The History window displays an illustration of SCCS delta branches for a selected file. This history graph allows you to peruse the delta structure of a file and assess associations between versions. Dashed lines are shown by default and indicate that the delta to the right of the dashed line was created by including the changes from the delta on the left. Following the dashed line provides you with a time-ordering sequence. In Figure 11-5, delta 1.123 is comprised of changes from both 1.122 and 1.120.1.2.

Gráfico

Figure 11-5 File History Window

The scroll bars at the right and bottom of the window allow you to scan a large history graph. If a delta on the displayed branch is checked out, a check mark is shown to the left of the SID.
The Differences button menu gives you the choice between bringing up a FileMerge window or a text editor displaying the textual differences between two selected deltas. The Differences button is only activated when two deltas are selected.

Internal bitmap(228x64)

  • The Use FileMerge menu item automatically brings up FileMerge when selected. The two selected deltas are displayed in the side-by-side panes. The name of the common ancestor is shown at the top of the window.
  • The View diff Output menu item allows you to display the textual differences between two selected deltas. Figure 11-6 is an example.

Gráfico

Figure 11-6 Text Editor Displaying Textual Output of Two Deltas

The View Contents button brings up the editor of your choice and displays the contents of the selected file. You can edit the file and create a temporary copy in your /tmp directory. You cannot write to the file itself. For information on how to define an editor, see Section , "Props Button," on page 231.
The Commands button menu lets you check out a file, check in a file, view the contents of a delta, or the differences between two selected deltas. For more information on the Commands menu, see "File History Window Commands Button" on page 226.
The Version Information pane at the bottom of the History window displays information for the most recently selected delta. The following information is displayed in the Version Information pane:
  • SCCS ID
  • Owner
  • Time
  • Date
  • Lines unchanged, inserted, deleted
The Delta Comment pane is a read-only display of the comments for the selected delta.

File History Window Commands Button

The Commands button menu on the File History window displays the following items:

Gráfico

Figure 11-7 History Window Commands Button Menu

The Check Out menu item has a pop-up menu that lets you check out a selected delta, or check out a delta and bring it up in an editor. For information on how to define an editor, see Section , "Props Button," on page 231. The Check Out menu item is only active when you select a checked in delta.
The Check In menu item brings up a pop-up window that lets you specify comments for the delta to be created. Once you add comments, you can check in the file by selecting the Check In button.

File History Window Pop-up Menu

The History window has a floating pop-up menu that, when displayed, provides the same menu items as the File History window Commands button menu. For more information on the File History Commands button menu, see "File History Window Commands Button" on page 226.

Commands Button

The Commands button menu on the base window displays the following items:

Gráfico

Figure 11-8

The Check Out menu item has a pop-up menu that lets you check out a selected delta, or check out a delta and bring it up in an editor. For information on how to define an editor, see Section , "Props Button," on page 231.
The Edit menu item brings up the contents of a selected file into an editor. If you select multiple files, an editor is brought up for each file.
The Check In menu item brings up a pop-up window that lets you specify comments for the delta to be created. Once you add comments, you can check in the file using the Check In button on the Check In pop-up.
The Check In New menu item brings up the Check In New window. The Check In New window displays a list of files not yet under SCCS control. It allows you to select files, add comments, and check them in. For more information on the Check In New window, see "Check In New Window" on page 229.
The Uncheckout menu item takes a checked-out writable file, removes its write permissions, and reverts it back to the last fixed delta state for the file.
The Latest Diffs menu item brings up FileMerge with the latest clear copy of a selected file and the latest checked-in delta displayed in side-by-side panes. This is a three way diff with the differences between the files discerned from
the common ancestor. The common ancestor file name is displayed in the Filemerge window header. This is a read-only display for browsing the latest differences between versions.

Check In New Window

The Check In New window displays the directory files that are not under SCCS control. The scroll bars to the right and bottom of the window let you peruse an extensive file listing.
The List field gives you the option of displaying all the files that are not under SCCS control or showing a specified group of files as defined by the shell pattern text field. Figure 11-9 shows the List pop-up menu. Figure 11-10 shows the Check In New window with the by Pattern menu item activated.

Gráfico

Figure 11-9 List Field Options

The Directory text field displays the directory path name for the files listed in the Check In New window. You can edit this field to define the path name of different directories.
The Initial Comments pane at the bottom of the window allows you to enter comments for a selected file that you want to check in under SCCS control. The scrollable comments pane supports a text-wrapping function that allows for extensive comments. When you select a file to check in, it is highlighted with a rectangular box.
The Check In button lets you check in the selected file or files.
The Reset button automatically clears the comment pane.
Once you check in a file under SCCS control, it is automatically removed from the Check In New display and transferred to the file list displayed in the Base window.
Figure 11-10 is an example of the Check In New window.

Gráfico

Figure 11-10 Check In New Window

Props Button

The Props button menu displays the following items:

Internal bitmap(221x65)

The VersionTool Props menu item brings up a Properties window that allows you to specify VersionTool properties. The Properties window and its options are described in the following section.
The Version menu item displays the current version number of VersionTool in the message area of the base window. Figure 11-11 shows the message area where the version number is displayed.

Gráfico

Figure 11-11 Version Display in Footer of Base Window

Properties Window

The Properties window allows you to set VersionTool properties in the following categories:
  • Main File List
  • Editor
  • Double Click Action
  • History Graph
  • History Information
  • SCCS File History Command
Figure 11-12 is an example of the Properties window. For more information on changing VersionTool properties, see Chapter 2, "VersionTool Basics."

Gráfico

Figure 11-12 Properties Window