User:Zli36/sandbox

Source Code Control System (SCCS) is an early version control system, geared toward program source code and other text files. It was originally developed in SNOBOL at Bell Labs in 1972 by Marc Rochkind for an IBM System/370 computer running OS/360 MVT. It was later rewritten by him in C for UNIX, then running on a PDP-11, and released with the Programmer's Workbench (PWB) edition of that operating system.

Subsequently, SCCS was included in AT&T's commercial System III and System V distributions. It was not licensed with 32V, the ancestor to Berkeley Unix. 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 systems, notably the Revision Control System (RCS) and later CVS, gained more widespread adoption. Today, these early version control systems are generally considered obsolete, particularly in the open source community, which has largely embraced distributed version control systems. However, the SCCS file format is still used internally by a few newer version control programs, including BitKeeper 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 system developers as foundational to advanced merging and versioning techniques, such as the "Precise Codeville" ("pcdv") merge.

Apart from fixing some Year 2000 problems in 1999, there is no active development on the various UNIX vendor specific SCCS versions. In 2006, Sun Microsystems (today part of Oracle Corporation) released their Solaris version of SCCS as open source under the Common Development and Distribution License as part of their efforts to open-source Solaris.

SCCS is also known for the  string, for example:

static char sccsid[] = "@(#)ls.c       8.1 (Berkeley) 6/11/93";

This 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 files were used during compilation. The "what" command is available to automate this search for version strings.

Background
The Source Code Control System (SCCS) is a system for controlling file and history changes. Source upgrade is one of the most significant parts in modern software development. In general, software upgraded to be a new version by fixing bugs, optimizing algorithms and adding extra functions. Obviously, many famous software have lots of versions，such as Java. However, additional problems occurs associate with these changes. Therefore, Source Code Control System, the most powerful weapon to solve these problems, appeared in developers' world. SCCS itself had a lot of changes during the past time.The SCCS has nine different major versions which are designed to help programmers control changes as a software. The differences are about facilities and design changes in terms of problem solving. Two specific successful implementations using SCCS : PDP 11 under Unix and IBM 370 under the OS.
 * Source code takes up too much space because it repeat again and again in every version.
 * Passing optimization through one version to other versions is very difficult.
 * It is hard to acquire the information about when and where changes occurring.
 * Finding the exact version which the client has problems with is not very easy.

Composition
SCCS consists of two parts: SCCS commands and SCCS files. All basic operation(e.g., create, delete,edit) can be realized by SCCS commands. SCCS files have a unique format prefix s., which could be easily controlled by SCCS commands.

SCCS Files
An SCCS file is composed by three different parts:
 * Delta table
 * Access and tracking flags
 * Body of the Text

Delta table
In SCCS, a delta refers to a change of 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 will be tracked by flags. Their functions are as below:
 * Setting permissions of editing of every SCCS file.
 * Control every release of every SCCS file.
 * Permitting collaborative editing of every SCCS file.
 * Mutual-referencing changes of every SCCS file.

Body of an SCCS file
All contents of a SCCS file are called "body". In other words, it likes a basket which include all things of a SCCS file. For example, pure text and all deltas are all in this "body". Control characters are used to specify valid deltas and text. Accordingly, a certain version can be determined.

SCCS Basic Commands
There are lots of commands that can be used in SCCS. These commands help us to finish what we want to achieve without understanding how they worked. Also, the SCCS allows us to have access to history files. Moreover, it also provide some commands which allow us edit,monitor and change the source files.

Create
The sccs create command uses the text of source file to create a new history file.For example:

The outputs are name, version and lines.

Edit
Edit a specific file.

Get
The outputs are version and lines you want to get from specific file.

Prt
This command produces a report of changes you made.

UNIX SCCS versions
Most UNIX versions include a version of SCCS, which, however, is often no longer actively developed.

Jörg Schilling's fork
Jörg Schilling (who requested the release of SCCS in the early days of the OpenSolaris project) maintains a fork of SCCS 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 includes a version of SCCS derived from the OpenSolaris source code and maintained between December 2006 and April 2007.

GNU conversion utility
GNU offers the SCCS compatible program GNU CSSC ("Compatibly Stupid Source Control"), which is occasionally used to convert SCCS archives to newer systems like CVS or Subversion; 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. Bitkeeper and TeamWare use the SCCS file format internally and can be considered successors to SCCS.