Small tutorial on SCCS
The Basics
SCCS is a software versioning and revision control system. It works by maintaining information about files in a main directory (called SCCS). Each person working on the code creates a symbolic link to this directory in his/her own workspace. There is an SCCS directory for each project.Setup
Decide on a central repository to store the code. This can be something like/usr/src/projectName
.Create the SCCS directory there:
mkdir /usr/src/projectName/SCCS
. Put the original files into the SCCS system usingsccs create filename
where
filename
is the name of the file.
Usage
- Creating a file and putting it into sccs:
sccs create filename
- checking files out for editing:
sccs edit filename
- checking files in after editing:
sccs delget filename
- getting a particular version of a file:
sccs get filename
gets the latest version of the filesccs get -rxx filename
gets version xx of the file - getting the latest version of all files:
sccs get SCCS/s.*
- getting information about which files are checked out:
sccs info
- getting information about a particular file:
sccs prt filename
- Diff between current file and checked in version:
sccs diffs filename
To modify a file, check it out for editing (edit), make the modifications, and then check it back in (delget).
Version info in the source code
SCCS provides the ability to mark your source files with the sccs information, such as the date of the last modification. To enable this, include the string%W% %G%
in your source code. Generally this would be placed inside a comment. Once a file is checked in, the string gets replaced by the name of the file and the date of last modification.
No comments:
Post a Comment