Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sccs(1) — Ultrix-32 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

admin(1)

cdc(1)

comb(1)

delta(1)

get(1)

prs(1)

rmdel(1)

sccsfile(4)

unget(1)

val(1)

what(1)

SCCS(1)

NAME

sccs − source code control system preprocessor

SYNTAX

sccs command [ −rSID ] [ −p ] [ −k ] [ −ilist ] [ −xlist ] [ −cdate ] [ −m ] [ −b ] [ −t ] [ −e ] [ fflag ] [ −dflag ] [ −tfile ] [ dSID ] [ −u ] [ −ifile ] [ −z ] [ file ] [ sccs ]

DESCRIPTION

The SCCS command is a source management system which maintains records of changes made in files within that system.  Records stating what the changes were, why and when they were made, and who made them are kept for each version.  Previous versions can be recovered, and different versions can be maintained simultaneouly.  SCCS also insures that two people are not editing the same file at the same time. 

The SCCS system has two levels of operation, a preprocessor called sccs and the traditional SCCS commands.  SCCS(1) ("sccs") is a preprocessor that provides an interface with the more traditional SCCS commands, such as get, delta, etc.  This provides a more user-friendly environment for the SCCS user.  Some of the commands are more intuitive, such as sccs edit rather than the traditional get -e to retrieve a file for editing.  Some commands will perform multiple operations, such as sccs delget that will perform a delta on the file, and then get the changed file back. 

SCCS(1) also restructures the method in which SCCS files are stored and manipulated.  In the traditional version of SCCS, files (s-files, p-files, etc.) are stored in the directory that contains the g-files, unless an SCCS directory is explicitly defined with each command.  The SCCS(1) preprocessor expects that an SCCS directory is available within the directory that contains the g-files and that this directory also contains the SCCS files.  The SCCS directory is owned by sccs, providing an additional level of security.  This method also cleans up the directory where the g-files are stored.  One other important difference in using the preprocessor is that the file specification is the name of the g-file rather than the name of the s-file when invoking an SCCS command. If SCCS is specified rather than the filename, the SCCS preprocessor handles this in the same manner as the traditional commands handle it.  Each s-file in the directory SCCS is acted upon as if explicitly named.  Please note that not all SCCS preprocessor commands permit this feature. 

The traditional SCCS commands are also included for reference in SEE ALSO.  If the SCCS preprocessor is used, small discrepencies may exist due to conflicts between the command parameters and the SCCS preprocessor parameters. 

SCCS stores all versions of each file along with the logged data about each version in the s-file.  Three major operations can be performed on the s-file:

1)To retrieve a file for reading or printing the command

sccs get [filename][sccs]

The latest version is retrieved and is NOT intended for edit. 

2)To retrieve a file for edit use the command

sccs edit [filename][sccs]

The latest version is retrieved and only one person can edit a given file at one time. 

3)To merge a file back into the s-file use the command

sccs delta [filename][sccs]

This is a companion operation to the edit command (2).  A new version number is assigned. Comments explaining the changes are saved. 

A delta consists of the changes made to a file, not the file itself.  All deltas to a given file are stored, enabling you to get a version of the file that has selected deltas removed which gives you the option of removing your selected changes later. 

An SID is an identification number for a delta.  It consists of two parts, a release number and a level number.  The release number normally remains constant but can be changed when major changes in the file are made.  The level numbers represent each delta for a given file.  A SID can also be used to represent a version number of the entire file. 

To create all the source files in a given directory in SCCS format, run the following shell script from csh:

mkdir SCCS save
foreach i (*.[.ch])
sccs admin -i$i $i
mv $1 save/$1
end

To create a single source file in SCCS format, assuming the
presence of the SCCS directory, use the command:

sccs create <filename>

Because the number and types of commands used within SCCS are many
and complex, the following quick reference table is included here.
Refer to
An Introduction to the Source Code
Eric Allman, Supplementary Documentation, Vol. II.
for further explanations of commands.

QUICK REFERENCE

COMMANDS

These commands should all be preceded by sccs. 

getGets files for compilation (not for editing).  Id keywords are expanded. 

−rSIDGet specified version. 

−pSend to standard output rather than to the actual file. 

−kDo not expand id keywords. 

−ilistInclude list of deltas. 

−xlistExclude list of deltas. 

−mPrecede each line with SID of delta being created. 

−cdateDo not apply any deltas created after date. 

editGets files for editing.  Id keywords are not expanded.  Should be matched with a delta command after editing. 

−rSIDGet specified version.  If SID specifies a release that does not yet exist, the highest numbered delta is retrieved and the new delta is numbered with SID

−bCreate a branch. 

−ilistInclude list of deltas

−xlistExclude list of deltas

deltaMerge a file retrieved using edit back into the s-file.  Collect comments about why this delta was made. 

uneditRemove a file that has been edited previously without merging the changes into the s-file. 

infoDisplay a list of all files being edited. 

−bIgnore branches. 

−u[user]
Ignore files not being edited by user . 

checkSame as info, except that nothing is printed if nothing is being edited and exit status is returned. 

createCreate an s. file and do not remove the associated g-file. 

tellSame as info, except that only the file name of files being edited is listed. 

cleanRemove all files that can be regenerated from the s-file. 

whatFind and print id keywords. 

adminCreate or set parameters on s-files. 

−ifileCreate, using file as the initial contents. 

−zRebuild the checksum in case the file has been corrupted. 

−fflagTurn on the flag. 

−dflagTurn off (delete) the flag . 

−tfileReplace the text in the s-file with the contents of file.  If file is omitted, the text is deleted.  Useful for storing documentation or design and implementation documents to insure distribution with the s-file. 

Useful flags are:

bAllow branches to be made using the -b flag to edit. 

dSIDDefault SID to be used on a get or edit. 

iCause No Id Keywords error message to be a fatal error rather than a warning. 

tThe module type; the value of this flag replaces the %Y% keyword. 

fixRemove a delta and reedit it. 

delgetDo a delta followed by a get. 

deleditDo a delta followed by an edit. 

ID KEYWORDS

%Z%Expands to @(#) for the what command to find. 

%M%The current module name, for example, prog.c. 

%I%The highest SID applied. 

%W%A shorthand for “%Z%%M% <tab> %I%”. 

%G%.The date of the delta corresponding to the %I%.  keyword. 

%R%.The current release number, for example, the first component of the %I% keyword. 

%Y%Replaced by the value of the t flag (set by admin). 

SEE ALSO

admin(1), cdc(1), comb(1), delta(1), get(1), prs(1), rmdel(1), sccsfile(4), unget(1), val(1), what(1), sccshelp An Introduction to the Source Code Eric Allman, Supplementary Documentation, Vol. II. 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026