Source Code Control System
Source Code Control System (SCCS) is a version control system designed to track changes in source code 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 beginning in late 1972 by Marc Rochkind for an IBM System/370 computer running OS/360.[1] A characteristic feature of SCCS is the sccsid string that is embedded into source code, and automatically updated by SCCS for each revision.[2] This example illustrates its use in the C programming language: 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 HistoryIn 1972, Marc Rochkind developed SCCS in SNOBOL4 at Bell Labs for an IBM System/370 computer running OS/360 MVT.[1] He rewrote SCCS in the C programming language for use under UNIX, then running on a PDP-11, in 1973. The first publicly released version was SCCS version 4 from February 18, 1977.[4] It was available with the Programmer's Workbench (PWB) edition of the operating system. 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's commercial System III and System V distributions. It was not licensed with 32V, the ancestor to BSD.[5] 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 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[6] has been developed from a modified version of SCCS[7] 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[8]). This storage technique is now considered by many version control system developers as foundational to advanced merging and versioning techniques,[9] such as the "Precise Codeville" ("pcdv") merge. Apart from correcting Year 2000 problems in 1999, no active development has taken place on the various UNIX vendor-specific SCCS versions.[10] In 2006, Sun Microsystems (today part of Oracle) released their Solaris version of SCCS as open-source under the CDDL license as part of their efforts to open-source Solaris.[11] BackgroundThe Source Code Control System (SCCS) is a system for controlling file and history changes. Software is typically upgraded to a new version by fixing bugs, optimizing algorithms and adding extra functions.[12] Changing software causes problems that require version control to solve.[1]
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[13] Two specific implementations using SCCS are: PDP 11 under Unix and IBM 370 under the OS.[1] CompositionSCCS consists of two parts: SCCS commands and SCCS files.[14] All basic operations (e.g., create, delete, edit) can be realized by SCCS commands.[14] SCCS files have a unique format prefix SCCS filesAn SCCS file consists of three parts:[15]
Delta tableIn 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.[15] Control and tracking flags in SCCS filesEvery operation of each SCCS file is tracked by flags. Their functions are as below:[15]
BodySCCS 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.[1] SCCS basic commandsSCCS 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.[16][17] It also provides access to the revision history of files under management. These commands are implemented as argument verbs to the driver program sccs. CreateThe 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. ImplementationsUNIX SCCS versionsMost UNIX versions include a version of SCCS, which, however, is often no longer actively developed.[18][better source needed] Jörg Schilling's forkThe late Jörg Schilling (who requested the release of SCCS in the early days of the OpenSolaris project)[19] maintained a fork of SCCS[20][21] 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.[22] Heirloom ProjectThe Heirloom Project includes a version of SCCS derived from the OpenSolaris source code[23] and maintained between December 2006 and April 2007.[24] GNU conversion utilityGNU 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;[25] it is not a complete[26] SCCS implementation and not recommended for use in new projects, but mostly meant for converting to a modern version control system. Other version control systemsSince 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.[27][28] On BSD systems, the SCCSID is replaced by a RCSID starting and ending with $; the corresponding tool is ident.[29] This system is originally used by RCS and added automatically on checkout. The resulting source code revision control identifiers are documented in the NetBSD[30] and FreeBSD[31] style guides for their own code bases. NetBSD defines the custom keyword $NetBSD: ...$ while FreeBSD defines $FreeBSD: ...$ and a macro renamed __FBSDID. 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.[32] References
Further reading
External links |