man-pages/man1p/sccs.1p

412 lines
12 KiB
Groff

.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
.TH "SCCS" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
.\" sccs
.SH NAME
sccs \- front end for the SCCS subsystem (\fBDEVELOPMENT\fP)
.SH SYNOPSIS
.LP
\fBsccs\fP \fB[\fP\fB-r\fP\fB][\fP\fB-d\fP \fIpath\fP\fB][\fP\fB-p\fP
\fIpath\fP\fB]\fP
\fIcommand\fP \fB[\fP\fIoptions\fP\fB...\fP\fB][\fP\fIoperands\fP\fB...\fP\fB]\fP\fB\fP
.SH DESCRIPTION
.LP
The \fIsccs\fP utility is a front end to the SCCS programs. It also
includes the capability to run set-user-id to another user
to provide additional protection.
.LP
The \fIsccs\fP utility shall invoke the specified \fIcommand\fP with
the specified \fIoptions\fP and \fIoperands\fP. By
default, each of the \fIoperands\fP shall be modified by prefixing
it with the string \fB"SCCS/s."\fP .
.LP
The \fIcommand\fP can be the name of one of the SCCS utilities in
this volume of IEEE\ Std\ 1003.1-2001 ( \fIadmin\fP, \fIdelta\fP,
\fIget\fP, \fIprs\fP, \fIrmdel\fP, \fIsact\fP, \fIunget\fP, \fIval\fP,
or \fIwhat\fP) or one of the pseudo-utilities listed in the EXTENDED
DESCRIPTION section.
.SH OPTIONS
.LP
The \fIsccs\fP utility shall conform to the Base Definitions volume
of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
except that \fIoptions\fP operands are
actually options to be passed to the utility named by \fIcommand\fP.
When the portion of the command:
.sp
.RS
.nf
\fIcommand\fP \fB[\fP\fIoptions\fP \fB...\fP \fB] [\fP\fIoperands\fP \fB...\fP \fB]\fP
.fi
.RE
.LP
is considered, all of the pseudo-utilities used as \fIcommand\fP shall
support the Utility Syntax Guidelines. Any of the other
SCCS utilities that can be invoked in this manner support the Guidelines
to the extent indicated by their individual OPTIONS
sections.
.LP
The following options shall be supported preceding the \fIcommand\fP
operand:
.TP 7
\fB-d\ \fP \fIpath\fP
A pathname of a directory to be used as a root directory for the SCCS
files. The default shall be the current directory. The
\fB-d\fP option shall take precedence over the \fIPROJECTDIR\fP variable.
See \fB-p\fP.
.TP 7
\fB-p\ \fP \fIpath\fP
A pathname of a directory in which the SCCS files are located. The
default shall be the \fBSCCS\fP directory.
.LP
The \fB-p\fP option differs from the \fB-d\fP option in that the \fB-d\fP
option-argument shall be prefixed to the entire
pathname and the \fB-p\fP option-argument shall be inserted before
the final component of the pathname. For example:
.sp
.RS
.nf
\fBsccs -d /x -p y get a/b
\fP
.fi
.RE
.LP
converts to:
.sp
.RS
.nf
\fBget /x/a/y/s.b
\fP
.fi
.RE
.LP
This allows the creation of aliases such as:
.sp
.RS
.nf
\fBalias syssccs="sccs -d /usr/src"
\fP
.fi
.RE
.LP
which is used as:
.sp
.RS
.nf
\fBsyssccs get cmd/who.c
\fP
.fi
.RE
.TP 7
\fB-r\fP
Invoke \fIcommand\fP with the real user ID of the process, not any
effective user ID that the \fIsccs\fP utility is set to.
Certain commands ( \fIadmin\fP, \fBcheck\fP, \fBclean\fP, \fBdiffs\fP,
\fBinfo\fP, \fIrmdel\fP, and \fBtell\fP) cannot be run set-user-ID
by all users, since this would allow
anyone to change the authorizations. These commands are always run
as the real user.
.sp
.SH OPERANDS
.LP
The following operands shall be supported:
.TP 7
\fIcommand\fP
An SCCS utility name or the name of one of the pseudo-utilities listed
in the EXTENDED DESCRIPTION section.
.TP 7
\fIoptions\fP
An option or option-argument to be passed to \fIcommand\fP.
.TP 7
\fIoperands\fP
An operand to be passed to \fIcommand\fP.
.sp
.SH STDIN
.LP
See the utility description for the specified \fIcommand\fP.
.SH INPUT FILES
.LP
See the utility description for the specified \fIcommand\fP.
.SH ENVIRONMENT VARIABLES
.LP
The following environment variables shall affect the execution of
\fIsccs\fP:
.TP 7
\fILANG\fP
Provide a default value for the internationalization variables that
are unset or null. (See the Base Definitions volume of
IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
for
the precedence of internationalization variables used to determine
the values of locale categories.)
.TP 7
\fILC_ALL\fP
If set to a non-empty string value, override the values of all the
other internationalization variables.
.TP 7
\fILC_CTYPE\fP
Determine the locale for the interpretation of sequences of bytes
of text data as characters (for example, single-byte as
opposed to multi-byte characters in arguments and input files).
.TP 7
\fILC_MESSAGES\fP
Determine the locale that should be used to affect the format and
contents of diagnostic messages written to standard
error.
.TP 7
\fINLSPATH\fP
Determine the location of message catalogs for the processing of \fILC_MESSAGES
\&.\fP
.TP 7
\fIPROJECTDIR\fP
.sp
Provide a default value for the \fB-d\fP \fIpath\fP option. If the
value of \fIPROJECTDIR\fP begins with a slash, it shall be
considered an absolute pathname; otherwise, the value of \fIPROJECTDIR\fP
is treated as a user name and that user's initial
working directory shall be examined for a subdirectory \fBsrc\fP or
\fBsource\fP. If such a directory is found, it shall be used.
Otherwise, the value shall be used as a relative pathname.
.sp
.LP
Additional environment variable effects may be found in the utility
description for the specified \fIcommand\fP.
.SH ASYNCHRONOUS EVENTS
.LP
Default.
.SH STDOUT
.LP
See the utility description for the specified \fIcommand\fP.
.SH STDERR
.LP
See the utility description for the specified \fIcommand\fP.
.SH OUTPUT FILES
.LP
See the utility description for the specified \fIcommand\fP.
.SH EXTENDED DESCRIPTION
.LP
The following pseudo-utilities shall be supported as \fIcommand\fP
operands. All options referred to in the following list are
values given in the \fIoptions\fP operands following \fIcommand\fP.
.TP 7
\fBcheck\fP
Equivalent to \fBinfo\fP, except that nothing shall be printed if
nothing is being edited, and a non-zero exit status shall be
returned if anything is being edited. The intent is to have this included
in an "install" entry in a makefile to ensure that
everything is included into the SCCS file before a version is installed.
.TP 7
\fBclean\fP
Remove everything from the current directory that can be recreated
from SCCS files, but do not remove any files being edited.
If the \fB-b\fP option is given, branches shall be ignored in the
determination of whether they are being edited; this is
dangerous if branches are kept in the same directory.
.TP 7
\fBcreate\fP
Create an SCCS file, taking the initial contents from the file of
the same name. Any options to \fIadmin\fP are accepted. If the creation
is successful, the original files shall be renamed by
prefixing the basenames with a comma. These renamed files should be
removed after it has been verified that the SCCS files have
been created successfully.
.TP 7
\fBdelget\fP
Perform a \fIdelta\fP on the named files and then \fIget\fP new versions.
The new versions shall have ID keywords expanded and shall not be
editable.
Any \fB-m\fP, \fB-p\fP, \fB-r\fP, \fB-s\fP, and \fB-y\fP options shall
be passed to \fIdelta\fP, and any \fB-b\fP, \fB-c\fP, \fB-e\fP, \fB-i\fP,
\fB-k\fP, \fB-l\fP, \fB-s\fP,
and \fB-x\fP options shall be passed to \fIget\fP.
.TP 7
\fBdeledit\fP
Equivalent to \fBdelget\fP, except that the \fIget\fP phase shall
include the \fB-e\fP
option. This option is useful for making a checkpoint of the current
editing phase. The same options shall be passed to \fIdelta\fP as
described above, and all the options listed for \fIget\fP above except
\fB-e\fP shall be passed to \fBedit\fP.
.TP 7
\fBdiffs\fP
Write a difference listing between the current version of the files
checked out for editing and the versions in SCCS format.
Any \fB-r\fP, \fB-c\fP, \fB-i\fP, \fB-x\fP, and \fB-t\fP options shall
be passed to \fIget\fP; any \fB-l\fP, \fB-s\fP, \fB-e\fP, \fB-f\fP,
\fB-h\fP, and \fB-b\fP options shall be
passed to \fIdiff\fP. A \fB-C\fP option shall be passed to \fIdiff\fP
as \fB-c\fP.
.TP 7
\fBedit\fP
Equivalent to \fIget\fP \fB-e\fP.
.TP 7
\fBfix\fP
Remove the named delta, but leave a copy of the delta with the changes
that were in it. It is useful for fixing small compiler
bugs, and so on. The application shall ensure that it is followed
by a \fB-r\fP \fISID\fP option. Since \fBfix\fP does not leave
audit trails, it should be used carefully.
.TP 7
\fBinfo\fP
Write a listing of all files being edited. If the \fB-b\fP option
is given, branches (that is, SIDs with two or fewer
components) shall be ignored. If a \fB-u\fP \fIuser\fP option is given,
then only files being edited by the named user shall be
listed. A \fB-U\fP option shall be equivalent to \fB-u\fP< \fIcurrent\ user\fP>.
.TP 7
\fBprint\fP
Write out verbose information about the named files, equivalent to
\fIsccs\fP \fIprs\fP.
.TP 7
\fBtell\fP
Write a <newline>-separated list of the files being edited to standard
output. Takes the \fB-b\fP, \fB-u\fP, and
\fB-U\fP options like \fBinfo\fP and \fBcheck\fP.
.TP 7
\fBunedit\fP
This is the opposite of an \fBedit\fP or a \fIget\fP \fB-e\fP. It
should be used with
caution, since any changes made since the \fIget\fP are lost.
.sp
.SH EXIT STATUS
.LP
The following exit values shall be returned:
.TP 7
\ 0
Successful completion.
.TP 7
>0
An error occurred.
.sp
.SH CONSEQUENCES OF ERRORS
.LP
Default.
.LP
\fIThe following sections are informative.\fP
.SH APPLICATION USAGE
.LP
Many of the SCCS utilities take directory names as operands as well
as specific filenames. The pseudo-utilities supported by
\fIsccs\fP are not described as having this capability, but are not
prohibited from doing so.
.SH EXAMPLES
.IP " 1." 4
To get a file for editing, edit it and produce a new delta:
.sp
.RS
.nf
\fBsccs get -e file.c
ex file.c
sccs delta file.c
\fP
.fi
.RE
.LP
.IP " 2." 4
To get a file from another directory:
.sp
.RS
.nf
\fBsccs -p /usr/src/sccs/s. get cc.c
\fP
.fi
.RE
.LP
or:
.sp
.RS
.nf
\fBsccs get /usr/src/sccs/s.cc.c
\fP
.fi
.RE
.LP
.IP " 3." 4
To make a delta of a large number of files in the current directory:
.sp
.RS
.nf
\fBsccs delta *.c
\fP
.fi
.RE
.LP
.IP " 4." 4
To get a list of files being edited that are not on branches:
.sp
.RS
.nf
\fBsccs info -b
\fP
.fi
.RE
.LP
.IP " 5." 4
To delta everything being edited by the current user:
.sp
.RS
.nf
\fBsccs delta $(sccs tell -U)
\fP
.fi
.RE
.LP
.IP " 6." 4
In a makefile, to get source files from an SCCS file if it does not
already exist:
.sp
.RS
.nf
\fBSRCS = <\fP\fIlist of source files\fP\fB>
$(SRCS):
sccs get $(REL) $@
\fP
.fi
.RE
.LP
.SH RATIONALE
.LP
SCCS and its associated utilities are part of the XSI Development
Utilities option within the XSI extension.
.LP
SCCS is an abbreviation for Source Code Control System. It is a maintenance
and enhancement tracking tool. When a file is put
under SCCS, the source code control system maintains the file and,
when changes are made, identifies and stores them in the file
with the original source code and/or documentation. As other changes
are made, they too are identified and retained in the
file.
.LP
Retrieval of the original and any set of changes is possible. Any
version of the file as it develops can be reconstructed for
inspection or additional modification. History data can be stored
with each version, documenting why the changes were made, who
made them, and when they were made.
.SH FUTURE DIRECTIONS
.LP
None.
.SH SEE ALSO
.LP
\fIadmin\fP , \fIdelta\fP , \fIget\fP , \fImake\fP , \fIprs\fP , \fIrmdel\fP
, \fIsact\fP , \fIunget\fP , \fIval\fP , \fIwhat\fP
.SH COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the
event of any discrepancy between this version and the original IEEE and
The Open Group Standard, the original IEEE and The Open Group Standard
is the referee document. The original Standard can be obtained online at
http://www.opengroup.org/unix/online.html .