Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

admin(1)

cdc(1)

comb(1)

delta(1)

get(1)

help(1)

prs(1)

rmdel(1)

sact(1)

sccsdiff(1)

unget(1)

val(1)

what(1)

sccsfile(5)

SCCS(1)  —  USER COMMANDS

NAME

sccs − front end for the SCCS subsystem

SYNOPSIS

sccs [ −r ] [ −dprefixpath ] [ −pfinalpath ] command [ SCCS-flags ... ] [ file ... ]

DESCRIPTION

system"

The sccs command is a front end to the utility programs of the Source Code Control System (SCCS). 

sccs normally prefixes each file, or the last component of each file, with the string SCCS/s., because you normally keep your SCCS database files in a directory called SCCS, and each database file starts with an s. prefix. 

Sccs program options must appear before the command argument.  Flags to be passed to the actual SCCS command (utility program) must appear after the command argument.  These flags are specific to the command being used, and are discussed in Programming Utilities for the Sun Workstation. 

Sccs also includes the capability to run ‘set user id’ to another user to provide additional protection.  Certain commands (such as admin) cannot be run ‘set user id’ by all users, since this would allow anyone to change the authorizations.  Such commands are always run as the real user.

OPTIONS

−rRuns sccs as the real user rather than as whatever effective user sccs is ‘set user id’ to. 

−dprefixpath
Defines the prefix portion of the pathname for the SCCS database files.  The default prefix portion of the pathname is the current directory. Prefixpath is prefixed to the entire pathname.  For example:

tutorial% sccs  −d/usr/include  get sys/inode.h
converts to:

get  /usr/include/sys/SCCS/s.inode.h
The intent here is to create aliases such as:

alias  syssccs  sccs  −d/usr/src
which will be used as:

tutorial% syssccs  get  cmd/who.c

−pfinalpath
Defines the name of a lower directory in which the SCCS files will be found; SCCS is the default.  Finalpath is appended before the final component of the pathname.  For example:

tutorial% sccs  −pprivate  get  usr/include/stdio.h
converts to:

get  usr/include/private/s.stdio.h

ADDITIONAL SCCS COMMANDS

Several ‘pseudo-commands’ are available in addition to the usual SCCS commands.  These are:

adminThe admin command is similar to that of the raw SCCS admin command.  When creating new s. files, the create command (described just below) does more of the startup work for you and should be used in preference to admin.

createCreate is used when creating new s. files.  Given a C source language file called obscure.c, Create does the following actions: (1) creates the s. file called s.obscure.c in the SCCS directory; (2) renames the original source file to ,obscure.c; (3) does an sccs get on obscure.c. 

editGet a file for editing. 

delgetPerform a delta on the named files and then get new versions.  The new versions have id keywords expanded, and so cannot be edited. 

deleditSame as delget, but produces new versions suitable for editing.  Deledit is useful for making a ‘checkpoint’ of your current editing phase. 

fixRemoves the named delta, but leaves you with a copy of the delta with the changes that were in it.  Fix must be followed by a −r flag.  Fix is useful for fixing small compiler bugs, etc.  Since fix doesn’t leave audit trails, use it carefully. 

cleanRemoves everything from the current directory that can be recreated from SCCS files.  Clean checks for and does not remove any files being edited.  If Clean −b is used, branches are not checked to see if they are currently being edited.  Note that −b is dangerous if you are keeping the branches in the same directory. 

unedit‘Undoes’ the last edit or get −e and returns a file to its previous condition.  If you unedit a file being edited, all changes made since the beginning of the editing session are lost. 

infoDisplays a list of all files being edited.  If the −b flag is given, branches (that is, SID’s with two or fewer components) are ignored.  If the −u flag is given (with an optional argument), only files being edited by you (or the named user) are listed. 

checkChecks for files currently being edited, like info, but returns an exit code rather than a listing:  nothing is printed if nothing is being edited, and a non-zero exit status is returned if anything is being edited.  Check may thus be included in an ‘install’ entry in a makefile, to ensure that everything is included in an SCCS file before a version is installed. 

tellDisplays a list of files being edited on the standard output.  Filenames are separated by newlines.  Takes the −b and −u flags like info and check. 

diffsCompares (in diff-like format) the current version of the program you have out for editing and the versions in SCCS format. 

EXAMPLES

To put a file called myprogram.c into SCCS format for the first time, assuming also that there is no SCCS directory already existing:

tutorial% mkdir SCCS
tutorial% sccs create myprogram.c
 myprogram.c:
1.1
14 lines
   after you have verified that everything is all right
   you remove the version of the file that starts with a comma:
tutorial% rm ,myprogram.c
tutorial%

To get a copy of myprogram.c for editing, edit that file, then place it back in the SCCS database:

tutorial% sccs edit myprogram.c
1.1
new delta 1.2
14 lines
tutorial% vi myprogram.c
   your editing session
tutorial% sccs delget myprogram.c
comments? Added abusive responses for compatibility with rest of system
1.2
7 inserted
7 deleted
7 unchanged
1.2
14 lines
tutorial%

To get a file from another directory:

tutorial% sccs −p/usr/src/sccs/  get cc.c

or:

tutorial% sccs get /usr/src/sccs/cc.c

To make a delta of a large number of files in the current directory:

tutorial% sccs delta ∗.c

To get a list of files being edited that are not on branches:

tutorial% sccs info −b

To delta everything that you are editing:

tutorial% sccs delta `sccs tell −u`

In a makefile, to get source files from an SCCS file if it does not already exist:

SRCS = <list of source files>
$(SRCS):
sccs get $(REL) $@

REGULAR SCCS COMMANDS

The ‘regular’ SCCS commands are described very briefly below.  It is unlikely that you ever need to use these commands because the user interface is so complicated, and the sccs front end command does 99.9% of the interesting tasks for you. 

admin Creates new SCCS files and changes parameters of exitsing SCCS files.  You can use sccs  create to create new SCCS files, or use sccs  admin to do other things. 

cdc Changes the commentary material in an SCCS delta. 

comb Combines SCCS deltas and reconstructs the SCCS files. 

delta Permanently introduces changes that were made to a file previously retrieved via sccs  get.  You can use sccs  delget as the more useful version of this command since sccs  delget does all of the useful work and more to boot. 

get Extracts a file from the SCCS database, either for compilation, or for editing when the −e option is used.  Use sccs  get if you really need it, but sccs  delget will normally have done this job for you.  Use sccs  edit instead of get with the −e option. 

help Supposed to help you interpret SCCS error messages, but usually just parrots the messaage and is generally not considered very helpful. 

prs Displays information about what is happening in an SCCS file. 

rmdel Removes a delta from an SCCS file. 

sact Displays information about editing activity in an SCCS file.  The sccs  info command is a lot more useful for the real life user. 

sccsdiff
Compares two versions of an SCCS file and generates the differences between the two versions.  The sccs  delget command does all this work as part of its normal process. 

unget Undoes the work of a previous get  −e command or a sccs  edit command.  Use the sccs  unedit command as a useful alternative. 

val Determines if a given SCCS file meets specified criteria.  If you use the sccs command, you shouldn’t need to use val, because its user interface is unbelievable.

what Displays SCCS identification information. 

FILES

/usr/sccs/∗

SEE ALSO

admin(1), cdc(1), comb(1), delta(1), get(1), help(1), prs(1), rmdel(1), sact(1), sccsdiff(1) unget(1), val(1), what(1), sccsfile(5)
Source Code Control System in Programming Utilities for the Sun Workstation

Sun Release 3.0β  —  Last change: 8 March 1984

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