Source Code Control System (SCCS) is a
version control system
In software engineering, version control (also known as revision control, source control, or source code management) is a class of systems responsible for managing changes to computer programs, documents, large web sites, or other collections o ...
designed to track changes in
source code
In computing, source code, or simply code, is any collection of code, with or without comment (computer programming), comments, written using a human-readable programming language, usually as plain text. The source code of a Computer program, p ...
and other text files during the development of a piece of software. This allows the user to retrieve any of the previous versions of the original source code and the changes which are stored. It was originally developed at
Bell Labs
Nokia Bell Labs, originally named Bell Telephone Laboratories (1925–1984),
then AT&T Bell Laboratories (1984–1996)
and Bell Labs Innovations (1996–2007),
is an American industrial research and scientific development company owned by mult ...
beginning in late 1972 by
Marc Rochkind for an
IBM System/370 computer running
OS/360
OS/360, officially known as IBM System/360 Operating System, is a discontinued batch processing operating system developed by IBM for their then-new System/360 mainframe computer, announced in 1964; it was influenced by the earlier IBSYS/IBJOB ...
.
[
]
A characteristic feature of SCCS is the ''sccsid'' string that is embedded into source code, and automatically updated by SCCS for each revision.
This example illustrates its use in the
C programming language
''The C Programming Language'' (sometimes termed ''K&R'', after its authors' initials) is a computer programming book written by Brian Kernighan and Dennis Ritchie, the latter of whom originally designed and implemented the language, as well as ...
:
static char sccsid[] = "@(#)ls.c 8.1 (Berkeley) 6/11/93";
This String (computer science), string contains the file name, date, and can also contain a comment. After compilation, the string can be found in binary and object files by looking for the pattern
@(#)
and can be used to determine which
source code
In computing, source code, or simply code, is any collection of code, with or without comment (computer programming), comments, written using a human-readable programming language, usually as plain text. The source code of a Computer program, p ...
files were used during compilation. The
what
command is available to automate this search for version strings.
History
In 1972,
Marc Rochkind developed SCCS in
SNOBOL4 at
Bell Labs
Nokia Bell Labs, originally named Bell Telephone Laboratories (1925–1984),
then AT&T Bell Laboratories (1984–1996)
and Bell Labs Innovations (1996–2007),
is an American industrial research and scientific development company owned by mult ...
for an
IBM System/370 computer running
OS/360
OS/360, officially known as IBM System/360 Operating System, is a discontinued batch processing operating system developed by IBM for their then-new System/360 mainframe computer, announced in 1964; it was influenced by the earlier IBSYS/IBJOB ...
MVT.
He rewrote SCCS in the C programming language for use under
UNIX
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
, then running on a
PDP-11
The PDP-11 is a series of 16-bit minicomputers sold by Digital Equipment Corporation (DEC) from 1970 into the 1990s, one of a set of products in the Programmed Data Processor (PDP) series. In total, around 600,000 PDP-11s of all models were so ...
, in 1973.
The first publicly released version was SCCS version 4 from February 18, 1977. It was available with the
Programmer's Workbench (PWB) edition of the
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
. Release 4 of SCCS was the first version that used a text-based history file format, earlier versions did use binary history file formats. Release 4 was no longer written or maintained by Marc Rochkind. Subsequently, SCCS was included in
AT&T
AT&T Inc. is an American multinational telecommunications holding company headquartered at Whitacre Tower in Downtown Dallas, Texas. It is the world's largest telecommunications company by revenue and the third largest provider of mobile tel ...
's commercial
System III and
System V
Unix System V (pronounced: "System Five") is one of the first commercial versions of the Unix operating system. It was originally developed by AT&T and first released in 1983. Four major versions of System V were released, numbered 1, 2, 3, an ...
distributions. It was not licensed with
32V
UNIX/32V is an early version of the Unix operating system from Bell Laboratories, released in June 1979. 32V was a direct port of the Seventh Edition Unix to the DEC VAX architecture.
Overview
Before 32V, Unix had primarily run on DEC PDP-11 ...
, the ancestor to
BSD. The SCCS command set is now part of the
Single UNIX Specification.
SCCS was the dominant version control system for Unix until later
version control
In software engineering, version control (also known as revision control, source control, or source code management) is a class of systems responsible for managing changes to computer programs, documents, large web sites, or other collections o ...
systems, notably the
RCS and later
CVS
CVS may refer to:
Organizations
* CVS Health, a US pharmacy chain
** CVS Pharmacy
** CVS Caremark, a prescription benefit management subsidiary
* Council for Voluntary Service, England
* Cable Video Store, former US pay-per-view service
* CVS F ...
, gained more widespread adoption. Today, these early version control systems are generally considered obsolete, particularly in the
open-source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
community, which has largely embraced
distributed version control
In software development, distributed version control (also known as distributed revision control) is a form of version control in which the complete codebase, including its full history, is mirrored on every developer's computer. Compared to centr ...
systems. However, the SCCS file format is still used internally by a few newer version control programs, including ''
BitKeeper
BitKeeper is a software tool for distributed revision control of computer source code. Originally developed as proprietary software by BitMover Inc., a privately held company based in Los Gatos, California, it was released as open-source software ...
'' and ''
TeamWare''. The latter is a frontend to SCCS.
Sablime' has been developed from a modified version of SCCS but uses a history file format that is incompatible with SCCS. The SCCS file format uses a storage technique called
interleaved deltas (or the weave). This storage technique is now considered by many
version control
In software engineering, version control (also known as revision control, source control, or source code management) is a class of systems responsible for managing changes to computer programs, documents, large web sites, or other collections o ...
system developers as foundational to advanced
merging and versioning techniques, such as the "Precise Codeville" ("pcdv") merge.
Apart from correcting
Year 2000 problem
The year 2000 problem, also known as the Y2K problem, Y2K scare, millennium bug, Y2K bug, Y2K glitch, Y2K error, or simply Y2K refers to potential computer errors related to the formatting and storage of calendar data for dates in and after ...
s in 1999, no active development has taken place on the various UNIX vendor-specific SCCS versions.
In 2006,
Sun Microsystems
Sun Microsystems, Inc. (Sun for short) was an American technology company that sold computers, computer components, software, and information technology services and created the Java programming language, the Solaris operating system, ZFS, ...
(today part of
Oracle
An oracle is a person or agency considered to provide wise and insightful counsel or prophetic predictions, most notably including precognition of the future, inspired by deities. As such, it is a form of divination.
Description
The wor ...
) released their
Solaris version of SCCS as
open-source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
under the
CDDL license as part of their efforts to open-source Solaris.
Background
The Source Code Control System (SCCS) is a system for controlling file and history changes. Software is typically
upgraded
Upgrading is the process of replacing a product with a newer version of the same product. In computing and consumer electronics an upgrade is generally a replacement of hardware, software or firmware with a newer or better version, in order to ...
to a new version by fixing bugs, optimizing algorithms and adding extra functions. Changing software causes problems that require version control to solve.
* Source code takes up too much space because it is repeated in every version.
* It is hard to acquire information about when and where changes occurred.
* Finding the exact version which the
client
Client(s) or The Client may refer to:
* Client (business)
* Client (computing), hardware or software that accesses a remote service on another computer
* Customer or client, a recipient of goods or services in return for monetary or other valuabl ...
has problems with is difficult.
SCCS was built to solve these problems. SCCS from AT&T had five major versions for the IBM OS and five major versions for UNIX
Two specific implementations using SCCS are: PDP 11 under Unix and IBM 370 under the OS.
Composition
SCCS consists of two parts: SCCS commands and SCCS files.
All basic operations (e.g., create, delete, edit) can be realized by SCCS commands.
SCCS files have a unique format prefix
s.
, which is controlled by SCCS commands.
SCCS files
An SCCS file consists of three parts:
* Delta table
* Access and tracking flags
* Body of the text
Delta table
In SCCS, a delta is a single revision in an SCCS file. Deltas are stored in a delta table, so each SCCS file has its own record of changes.
Control and tracking flags in SCCS files
Every operation of each SCCS file is tracked by flags. Their functions are as below:
* Setting permissions for editing of every SCCS file.
* Control each release of every SCCS file.
* Permitting
collaborative editing of every SCCS file.
* Mutual-referencing changes of every SCCS file.
Body
SCCS uses three types of control records for keeping track of insertions and deletions applied in different deltas. They are the insertion control record, the deletion control record, and the end control record. Whenever a user changes some part of the text, a control record is inserted surrounding the change. The control records are stored in the body along with the original text records.
SCCS basic commands
SCCS provides a set of commands in the form of macro invocations that perform or initiate source code management functions with a simple syntax, such as create, get, edit, prt. It also provides access to the revision history of files under management. These commands are implemented as argument verbs to the driver program ''sccs''.
Create
The sccs command ''create'' uses the text of a source file to create a new history file. For example:
$ sccs create program.c
program.c:
1.1
87 lines
The outputs are name, version and lines.
The command is a macro that expands to ''admin'' to create the new history file followed by ''get'' to retrieve the file.
Edit
$ sccs edit program.c
1.1
new delta 1.2
87 lines
Edit a specific file.
The command is a macro that expands to ''get -e''.
Delget
$ sccs delget program.c
comments? main function enhanced
1.2
10 inserted
0 deleted
87 unchanged
1.2
97 lines
Check in new version and get the new version from sccs.
The command is a macro that expands to ''delta'' to check in the new version file followed by ''get'' to retrieve the file.
Get
$ sccs get program.c
1.1
87 lines
The outputs are version and lines you want to get from specific file.
Prt
$ sccs prt program.c
This command produces a report of source code changes.
Implementations
UNIX SCCS versions
Most
UNIX
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
versions include a version of SCCS, which, however, is often no longer actively developed.
Jörg Schilling's fork
The late (who requested the release of SCCS in the early days of the
OpenSolaris
OpenSolaris () is a discontinued open-source computer operating system based on Solaris and created by Sun Microsystems. It was also, perhaps confusingly, the name of a project initiated by Sun to build a developer and user community around t ...
project) maintained a
fork
In cutlery or kitchenware, a fork (from la, furca ' pitchfork') is a utensil, now usually made of metal, whose long handle terminates in a head that branches into several narrow and often slightly curved tines with which one can spear foods ...
of SCCS
[Jörg Schilling's SCCS development website](_blank)
/ref> that is based on the OpenSolaris source code. It has received major feature enhancements but remains compatible with the original SCCS versions unless using the "new project" mode.
Heirloom Project
The Heirloom Project
The Heirloom Project is a collection of traditional Unix utilities. Most of them are derived from original Unix source code, as released as open-source by Caldera and Sun.
The project has the following components:
* The Heirloom Toolchest: awk ...
includes a version of SCCS derived from the OpenSolaris
OpenSolaris () is a discontinued open-source computer operating system based on Solaris and created by Sun Microsystems. It was also, perhaps confusingly, the name of a project initiated by Sun to build a developer and user community around t ...
source code and maintained between December 2006 and April 2007.
GNU conversion utility
GNU
GNU () is an extensive collection of free software
Free software or libre software is computer software distributed under terms that allow users to run the software for any purpose as well as to study, change, and distribute it and any ...
offers the SCCS compatible progra
GNU CSSC
("Compatibly Stupid Source Control"), which is occasionally used to convert SCCS archives to newer systems like CVS
CVS may refer to:
Organizations
* CVS Health, a US pharmacy chain
** CVS Pharmacy
** CVS Caremark, a prescription benefit management subsidiary
* Council for Voluntary Service, England
* Cable Video Store, former US pay-per-view service
* CVS F ...
or Subversion
Subversion () refers to a process by which the values and principles of a system in place are contradicted or reversed in an attempt to transform the established social order and its structures of power, authority, hierarchy, and social norms. Sub ...
; it is not a complete SCCS implementation and not recommended for use in new projects, but mostly meant for converting to a modern version control system.
Other version control systems
Since the 1990s, many new version control systems have been developed and become popular that are designed for managing projects with a large number of files and that offer advanced functionality such as multi-user operation, access control, automatic building, network support, release management and distributed version control
In software development, distributed version control (also known as distributed revision control) is a form of version control in which the complete codebase, including its full history, is mirrored on every developer's computer. Compared to centr ...
. Bitkeeper
BitKeeper is a software tool for distributed revision control of computer source code. Originally developed as proprietary software by BitMover Inc., a privately held company based in Los Gatos, California, it was released as open-source software ...
and TeamWare use the SCCS file format internally and can be considered successors to SCCS.
On BSD systems, the SCCSID is replaced by a RCSID starting and ending with ; the corresponding tool is . This system is originally used by RCS and added automatically on checkout. The resulting source code revision control identifiers are documented in the NetBSD
NetBSD is a free and open-source Unix operating system based on the Berkeley Software Distribution (BSD). It was the first open-source BSD descendant officially released after 386BSD was forked. It continues to be actively developed and is a ...
and FreeBSD
FreeBSD is a free and open-source Unix-like operating system descended from the Berkeley Software Distribution (BSD), which was based on Research Unix. The first version of FreeBSD was released in 1993. In 2005, FreeBSD was the most popular ...
style guides for their own code bases. NetBSD defines the custom keyword while FreeBSD defines and a macro renamed .
The SRC version control system can also use the SCCS file format internally (or RCS's) and aims to provide a better user interface for SCCS while still managing only single-file projects.
References
Further reading
Essay from Marc Rochkind on how SCCS was invented
*
*
*
* – AIX 7.3 manual page
*
*
External links
Schily's SCCS on Codeberg
{{Authority control
1972 software
Version control systems
Free version control software
Unix archivers and compression-related utilities
Unix SUS2008 utilities
Self-hosting software
Software using the CDDL license