Source Code Control System
{{Short description|Version control system for source code}}
{{More citations needed|date=March 2010}}
{{Infobox software
| name = Source Code Control System (SCCS)
| logo =
| screenshot =
| caption =
| author = Marc J. Rochkind
| developer = Bell Labs
| released = {{Start date and age|1973}}
| latest release version =
| latest release date =
| latest preview version =
| latest preview date =
| programming language = First version: SNOBOL4
Rewrite: C
| operating system = OS/360, Unix, Unix-like
| platform = IBM System/370, PDP-11, IA-32
| genre = Version control
| license = proprietary licenses, Common Development and Distribution License
| repo = N/A
| website = {{URL|http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sccs.html| The Open Group Base Specifications Issue 7, IEEE Std 1003.1-2008, 2016 Edition}}
}}
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.{{Citation |last=Rochkind |first=Marc J. |url=http://basepath.com/aup/talks/SCCS-Slideshow.pdf |title=The Source Code Control System |periodical=IEEE Transactions on Software Engineering |volume=SE-1 |issue=4 |date=December 1975 |pages=364–370 |doi=10.1109/tse.1975.6312866 |s2cid=10006076 |access-date=2005-07-08 |archive-date=2011-05-25 |archive-url=https://web.archive.org/web/20110525193926/http://basepath.com/aup/talks/SCCS-Slideshow.pdf |url-status=dead }}
A characteristic feature of SCCS is the sccsid string that is embedded into source code, and automatically updated by SCCS for each revision.{{Cite web|url=http://docs.oracle.com/cd/E19504-01/802-5880/6i9k05dhp/index.html|title=Chapter 5 SCCS Source Code Control System|last=Oracle|website=Programming Utilities Guide}} 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 @(#)
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.{{cite web |url=https://pubs.opengroup.org/onlinepubs/9699919799/utilities/what.html |title=what |author= |date=n.d. |publisher=IEEE and The Open Group |access-date=November 28, 2022}}
History
In 1972, Marc Rochkind developed SCCS in SNOBOL4 at Bell Labs for an IBM System/370 computer running OS/360 MVT. 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.http://sccs.sourceforge.net/PWB.html AT&T Announcement for SCCSv4 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.SCCS [http://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/man/cat1/what.1 what(1)] manpage from 4BSD, 1980, on the website of [http://www.tuhs.org/ The Unix Heritage Society] {{webarchive|url=https://web.archive.org/web/20050831153956/http://www.tuhs.org/ |date=2005-08-31 }}. 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{{cite web|title=Sablime Webpage|website=Alcatel-Lucent|url=http://sablime.alcatel-lucent.com|archive-url=https://web.archive.org/web/20160722092853/http://sablime.alcatel-lucent.com/|archive-date=2016-07-22|url-status=dead }} has been developed from a modified version of SCCSEstublier, Jacky, David Leblang, André van der Hoek, Reidar Conradi, Geoffrey Clemm, Walter Tichy, and Darcy Wiborg-Weber. “Impact of software engineering research on the practice of software configuration management.” ACM Transactions on Software Engineering and Methodology (TOSEM) 14 (October 2005): 383–430. 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{{Citation |last=Hudson |first=Greg |url=http://web.mit.edu/ghudson/thoughts/file-versioning |title=Notes on keeping version histories of files |publisher=Unpublished personal notes |date=2002-10-03}}). This storage technique is now considered by many version control system developers as foundational to advanced merging and versioning techniques,Estublier, Jacky, David Leblang, André van der Hoek, Reidar Conradi, Geoffrey Clemm, Walter Tichy, and Darcy Wiborg-Weber. “Impact of software engineering research on the practice of software configuration management.” ACM Transactions on Software Engineering and Methodology (TOSEM) 14 (October 2005): p.398. 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.
[https://www.gnu.org/software/cssc/ What is SCCS], GNU operating System
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.{{cite web|url=http://mail.opensolaris.org/pipermail/opensolaris-announce/2006-December/000364.html |title=SCCS/make source available |date=2006-12-19 |access-date=2011-11-14 |author=Stephen Lau, Sun Microsystems |url-status=dead |archive-url=https://web.archive.org/web/20120425142501/http://mail.opensolaris.org/pipermail/opensolaris-announce/2006-December/000364.html |archive-date=April 25, 2012 }}
Background
The 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.Home Organization Selection {{ProQuest|215925387}} 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 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 UNIXThe evolution of a Source Code Control System. Alan L.Glasser, published in sigmetrics, Nov 1978 when SCCS on UNIX was a version 4
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.{{Cite web|url=http://www-h.eng.cam.ac.uk/help/tpl/languages/sccs.html|title=SCCS|website=www-h.eng.cam.ac.uk|access-date=2016-09-12}} 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:{{Cite web|url=https://www.ibm.com/support/knowledgecenter/ssw_aix_53/com.ibm.aix.genprogc/doc/genprogc/sccs.htm|title=General Programming Concepts: Writing and Debugging Programs|last=IBM|website=IBM Knowledge Center|date=7 June 2018 }}
- Delta table
- Access and tracking flags
- Body of the text
= Delta table =
= 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.[http://sccs.sourceforge.net/man/sccs.me.html An Introduction to the Source Code Control System ] Eric Allman, Project Ingres, University of California at Berkeley[http://docs.oracle.com/cd/E19504-01/802-5880/6i9k05dhp/index.html Source Code Control System] Programming Utilities Guide 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 versions include a version of SCCS, which, however, is often no longer actively developed.Koike, Hideki, and Hui-Chu Chu. "VRCS: Integrating version control and module management
using interactive three-dimensional graphics." Visual Languages, 1997. Proceedings. 1997
IEEE Symposium on. IEEE, 1997.{{better source needed|date=September 2016}}
= Jörg Schilling's fork =
The late {{ill|Jörg Schilling|de}} (who requested the release of SCCS in the early days of the OpenSolaris project){{cite web|title=os.solaris.opensolaris.rfe - Re: star - msg#00001 - Recent Discussion OSDir.com|url=http://osdir.com/ml/os.solaris.opensolaris.rfe/2006-05/msg00001.html|website=osdir.com|access-date=10 September 2016}} maintained a fork of SCCS[http://sccs.sourceforge.net/ Jörg Schilling's SCCS development website]{{cite web |url=https://codeberg.org/schilytools/schilytools/src/branch/master/AN-2022-10-16 |title=A collection of tools written or formerly managed by Jörg Schilling. |author= |date=22 October 2022 |website=Codeberg |access-date=28 November 2022 |quote=development has been picked up by a group of volunteers who would like to keep the project alive and well}} 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.[http://sccs.sourceforge.net/#compatibility Schily SCCS web site]: "Will the upcoming SCCSv6 stay compatible with POSIX and with historic SCCS implementations?"
= Heirloom Project =
The Heirloom Project includes a version of SCCS derived from the OpenSolaris source code{{cite web |url=http://heirloom.sourceforge.net/devtools.html |title=The Heirloom Development Tools |author=Gunnar Ritter |date=20 June 2010 |access-date=4 November 2011}} and maintained between December 2006 and April 2007.http://heirloom.cvs.sourceforge.net/viewvc/heirloom/heirloom-devtools/sccs/ see CVS history
= GNU conversion utility =
GNU offers the SCCS compatible program [https://www.gnu.org/software/cssc/ GNU CSSC] ("Compatibly Stupid Source Control"), which is occasionally used to convert SCCS archives to newer systems like CVS or Subversion;[http://sccs2svn.berlios.de/ SCCS2SVN conversion utility] {{webarchive|url=https://web.archive.org/web/20091222091016/http://sccs2svn.berlios.de/ |date=2009-12-22 }}, which works with both SCCS and CSSC it is not a complete[https://www.gnu.org/s/cssc/manual/Incomplete.html#Incomplete GNU CSSC list of limitations in its documentation] 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.{{cite web|title=revtool|work=BitKeeper Documentation|url=https://www.bitkeeper.org/man/revtool.html}}{{cite web|title=Introduction to Sun WorkShop TeamWare|url=https://docs.oracle.com/cd/E19957-01/806-3573/intro.html|website=docs.oracle.com|access-date=10 September 2016}}
On BSD systems, the SCCSID is replaced by a RCSID starting and ending with {{mono|$}}; the corresponding tool is {{mono|ident}}.{{Man|1|ident|NetBSD}} This system is originally used by RCS and added automatically on checkout. The resulting source code revision control identifiers are documented in the NetBSD{{cite web|title=src/share/misc/style revision 1.64|url=http://cvsweb.netbsd.org/bsdweb.cgi/src/share/misc/style?rev=1.64&content-type=text/x-cvsweb-markup|publisher=NetBSD CVS repository}} and FreeBSD{{Man|9|style|FreeBSD}} style guides for their own code bases. NetBSD defines the custom keyword {{mono|$NetBSD: ...$}} while FreeBSD defines {{mono|$FreeBSD: ...$}} and a macro renamed {{mono|__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.{{cite web |url=http://www.catb.org/esr/src/ |title=Resource page for src 1.29 |author= |date=January 21, 2022 |access-date=November 28, 2022 |quote=}}
References
{{Reflist|30em}}
Further reading
- [http://sccs.sourceforge.net/sccs_invention.html Essay from Marc Rochkind on how SCCS was invented]
- {{man|1|sccs|SUS}}
- {{man|1|sccs|FreeBSD}}
- {{man|1|sccs|Solaris}}
- {{man/format|1|sccs|3=https://www.ibm.com/docs/en/aix/7.3?topic=s-sccs-command}} – AIX 7.3 manual page
- {{man|1|sccs|HP-UX}}
- {{man|1|sccs|IRIX}}
External links
- [https://codeberg.org/schilytools/schilytools Schily's SCCS on Codeberg]
{{Version control software}}
{{Authority control}}
Category:Version control systems
Category:Free version control software
Category:Unix archivers and compression-related utilities
Category:Unix SUS2008 utilities
Category:Self-hosting software
Category:Software using Common Development and Distribution License