Intel XENIX 286 Programmers Guide (86) - Tenox.tc

Intel XENIX 286 Programmers Guide (86) - Tenox.tc Intel XENIX 286 Programmers Guide (86) - Tenox.tc

09.06.2013 Views

XENIX Programming SCCS: Source Code Control System sees Working Files SCCS uses several different kinds of files to complete its tasks. In general, these files contain information about the commands in progress or contain actual text. For convenience, SCCS names these files by placing a prefix before the name of the original file from which all versions are made. The following is a list of the working files: s-file x-file g-file p-file z-file 1-file d-file q-file Contains all versions of the given text file. The versions are stored as deltas, that is, lists of changes to be applied to the original file to create the given version. The name of an s-file is formed by placing the prefix s. at the beginning of the original file name. A temporary copy of the s-file. It is created by SCCS commands that change the s-file and is used instead of the s-file to carry out the changes. When all changes are complete, sees removes the original · file and gives the x-file the name of the original s-file. The name of the x-file is formed by placing the prefix x. at the beginning of the original file name. An ordinary text file created by applying the deltas in a given s-file to the original file. The g-file represents a copy of the given version of the original file and as such receives the same file name as the original. When created, a g-file is placed in the current working directory of the user who requested the file. A special file containing information about the versions of an s-file currently being edited. The p-file is created when a g-file is retrieved from the s-file. The file remains until all currently retrieved files have been saved in the sfile. The p-file contains one or more entries describing the SID of the retrieved g-file, the proposed SID of the new, edited g-file, and the login name of the user who retrieved the g-file. The p-file name is formed by placing the prefix p. at the beginning of the original file name. A lock file used by sees commands to prevent two users from updating a single SCCS file at the same time. Before a command modifies an SCCS file, it creates a z-file and copies its own process ID to it. Any other command that attempts to access the file while the z-file is present displays an error message and stops. When the original command has finished its tasks, it deletes the z-file before stopping. The z-file name is formed by placing the prefix z. at the beginning of the original file name. A special file containing a list of the deltas required to create a given version of a file. The 1-file name is formed by placing the prefix 1. at the beginning of the original file name. A temporary copy of the g-file used to generate a new delta. A tem porary file used by the delta command when updating the corresponding p-file. The q-file is not directly accessible. In general, a user never directly accesses x-files, z-files, d-files, or q-files. If a system crash or sim ilar situation abnormally terminates a command, the user may wish to delete these files before using the sees commands. 5-3

SCCS: Source Code Control System XENIX Programming SCCS Command Argu ments Almost all SCCS commands accept two types of arguments: options and file names. These appear in the sees command line immediately after the command name. An option indicates a special action to be taken by the given sees command. An option is usually a lowercase letter preceded by a hyphen (-). Some options require an additional name or value. A file name indicates the file to be acted on. The syntax for sees file names is like other XENIX file names. Appropriate path names must be given if required. Some commands also allow directory names. In this case, all files in the directory are acted on. If the directory contains non-sees or unreadable files, these are ignored. A file name must not begin with a hyphen (-). The special symbol - may be used to cause an SCCS command to read a list of file names from the standard input. These file names are then used as names for the files to be processed. The list must be terminated by the end-of-file character CONTROL-D. Any options given with a command apply to all files. The sees commands process the options before any file names so the options may appear anywhere on the command line. File names are processed left to right. If a command encounters a fatal error, it stops processing the current file and, if any other files have been given, begins processing the next. File Administrator Every SCCS file requires an administrator to maintain and keep the file in order. The adm inistrator is usually the user who created the file and therefore owns the file. When other users intend to access the file, the administrator must ensure that they have adequate access. Several SCCS commands are used by the administrator to define who has access to the versions in a given s-file. These commands are described later. Creating and Using s-files The s-file is the key element in SCCS. It provides compact storage for all versions of a given file and automatic maintenance of the relationships between the versions. This section explains how to use the admin, get, and delta commands to create and use s-files. In particular, it describes how to create the first version of a file, how to retrieve versions for reading and editing, and how to save new versions. 5-4

<strong>XENIX</strong> Programming SCCS: Source Code Control System<br />

sees Working Files<br />

SCCS uses several different kinds of files to complete its tasks. In general, these files<br />

contain information about the commands in progress or contain actual text. For<br />

convenience, SCCS names these files by placing a prefix before the name of the original<br />

file from which all versions are made. The following is a list of the working files:<br />

s-file<br />

x-file<br />

g-file<br />

p-file<br />

z-file<br />

1-file<br />

d-file<br />

q-file<br />

Contains all versions of the given text file. The versions are stored as<br />

deltas, that is, lists of changes to be applied to the original file to create the<br />

given version. The name of an s-file is formed by placing the prefix s. at the<br />

beginning of the original file name.<br />

A temporary copy of the s-file. It is created by SCCS commands that change<br />

the s-file and is used instead of the s-file to carry out the changes. When all<br />

changes are complete, sees removes the original · file and gives the x-file<br />

the name of the original s-file. The name of the x-file is formed by placing<br />

the prefix x. at the beginning of the original file name.<br />

An ordinary text file created by applying the deltas in a given s-file to the<br />

original file. The g-file represents a copy of the given version of the original<br />

file and as such receives the same file name as the original. When created, a<br />

g-file is placed in the current working directory of the user who requested<br />

the file.<br />

A special file containing information about the versions of an s-file currently<br />

being edited. The p-file is created when a g-file is retrieved from the s-file.<br />

The file remains until all currently retrieved files have been saved in the sfile.<br />

The p-file contains one or more entries describing the SID of the<br />

retrieved g-file, the proposed SID of the new, edited g-file, and the login<br />

name of the user who retrieved the g-file. The p-file name is formed by<br />

placing the prefix p. at the beginning of the original file name.<br />

A lock file used by sees commands to prevent two users from updating a<br />

single SCCS file at the same time. Before a command modifies an SCCS<br />

file, it creates a z-file and copies its own process ID to it. Any other<br />

command that attempts to access the file while the z-file is present displays<br />

an error message and stops. When the original command has finished its<br />

tasks, it deletes the z-file before stopping. The z-file name is formed by<br />

placing the prefix z. at the beginning of the original file name.<br />

A special file containing a list of the deltas required to create a given<br />

version of a file. The 1-file name is formed by placing the prefix 1. at the<br />

beginning of the original file name.<br />

A temporary copy of the g-file used to generate a new delta.<br />

A tem porary file used by the delta command when updating the<br />

corresponding p-file. The q-file is not directly accessible.<br />

In general, a user never directly accesses x-files, z-files, d-files, or q-files. If a system<br />

crash or sim ilar situation abnormally terminates a command, the user may wish to<br />

delete these files before using the sees commands.<br />

5-3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!