Help on SCCS

bob desinger bd at hpsemc.HP.COM
Wed Mar 2 05:15:21 AEST 1988


Rit Chiang (chiang at m2c.ORG) writes:
> 1) Since SCCS would not let you do hierarchy, is there anything out
> there that can traverse the tree structure of SCCS directories.  I have
> implemented a recursive csh script that would take any SCCS commands
> and traverse down the tree.  However, I have noticed the performance
> is awful.

The csh may be dragging you down; scripts written in csh start up more
slowly and are more sluggish to respond to signals than /bin/sh or ksh
scripts.  Try rewriting it in sh (or ksh if you have that).

It's possible that the script's algorithm may be slow, too, but fixing
that would require a lot of testing to see what your shell can do
quickly, followed by a rewrite of the slowest parts.  Rewriting may
involve C instead of shell, which takes much longer but offers better
measurement tools (prof or gprof).

A more deep-seated problem may be your file system's performance.  If
a simple `find {sccs-directories} -print' command seems slow, file
system accesses are slow and rewriting your scripts will probably be
pointless.  Fixing this can be painful.  You might get a minor tune-up
(improving file system access speed by about 5% or less) via a full
backup of the filesystem followed by a newfs [or mkfs, depending on
your Unix implementation] and then a restore.  But your root-person or
admin staff won't be keen to do this because it's time-consuming, it's
dangerous, it wears off after a while, and 5% is a pretty meager
improvement even if you get that much.

> 2) Has anyone implemented anything on top of SCCS, such as report generation,
> storage of non-ASCII files, and the likes.

Report generation is typically done with shell scripts that call prs(1)
and awk or sed.  This is SCCS's biggest advantage over RCS:  prs can
reveal astonishing details about what changed or how much.

Storage of non-ASCII (really, "unprintable") files will be hard to do
without pre-processing, since SCCS uses a leading control-A on some
lines to maintain history and administrative data.  Control-A is value
"1", which tends to occur pretty often in binary data.  According to
Kernighan and Pike's _The_Unix_Programming_Environment_, SCCS uses the
diff program.  Using diff on binaries is, er, unwieldy.

> 3) Is there any good references besides Intro to SCCS, that could
> provide me with a better understanding on how organization utilized SCCS
> in their development environment.

If you know anyone who has an HP-UX system, borrow their _HP-UX_
_Concepts_and_Tutorials:_Programming_Environment_ manual and look in
the SCCS section.  Starting on page 41, the section on "Using SCCS on
a Multi-User Project" explains one scheme and shows some code to help
you get started administering a project.

Intermediate Unix programming classes usually touch on SCCS, too.  I'm
surprised that there's no Nutshell Handbook about SCCS, although the
Handbook on `make' mentions it briefly.

If you get any good answers by mail, please summarize to the net!

bob desinger
bd%hpsemc at hplabs.HP.COM



More information about the Comp.unix.wizards mailing list