Clean up the manual page by leaps and bounds in terms of formatting.

Ruslan's version took away the '.Nm' for some commands, but not others, so
I chose to go with leaving '.Nm'.

Submitted by:	ru
This commit is contained in:
jmallett 2002-05-22 13:59:52 +00:00
parent 2870264e7a
commit d4078e4db2

View File

@ -38,7 +38,7 @@
.Sh NAME
.Nm sccs
.Nd front end for the
.Li SCCS
.Tn SCCS
subsystem
.Sh SYNOPSIS
.Nm
@ -46,21 +46,22 @@ subsystem
.Op Fl d Ar path
.Op Fl p Ar path
.Ar command
.Op flags
.Op Ar flags
.Op Ar
.Sh DESCRIPTION
The
.Nm
utility is a front end to the
.Li SCCS
.Tn SCCS
programs
that
helps them mesh more cleanly
with
the rest of UNIX.
the rest of
.Ux .
It
also includes the capability to run
.Dq set user id
.Dq set-user-ID
to another user
to
provide additional protection.
@ -72,7 +73,7 @@ runs the command with the specified
and
.Ar args .
Each argument is normally modified to be prepended with
.Dq Li SCCS/s. .
.Pa SCCS/s. .
.Pp
Flags to be interpreted by the
.Nm
@ -80,7 +81,7 @@ program must be before the
.Ar command
argument.
Flags to be passed to the actual
.Li SCCS
.Tn SCCS
program must come after the
.Ar command
argument.
@ -88,44 +89,36 @@ These flags are specific to the command and
are discussed in the documentation for that command.
.Pp
Besides the usual
.Li SCCS
.Tn SCCS
commands,
several
.Dq pseudo-commands
can be issued.
These are:
.Bl -tag -width deledit
.It Cm edit
.Bl -tag -width ".Ic deledit"
.It Ic edit
Equivalent
to
.Dq Li get \-e .
.It Cm delget
to
.Nm get Fl e .
.It Ic delget
Perform a delta on the named files and
then get new versions.
The new versions will have id keywords expanded, and
The new versions will have ID keywords expanded, and
will not be editable.
The
.Fl m ,
.Fl p ,
.Fl r ,
.Fl s ,
.Fl m , p , r , s ,
and
.Fl y
flags will be passed to
.Nm delta ,
and the
.Fl b,
.Fl c ,
.Fl e ,
.Fl i ,
.Fl k ,
.Fl l ,
.Fl s ,
and the
.Fl b, c , e , i , k , l , s ,
.\" anybody who has a bad xterm which is almost anyone
and
.Fl x
flags will be passed to get.
.It Cm deledit
flags will be passed to
.Nm get .
.It Ic deledit
Equivalent
to
.Nm delget
@ -137,10 +130,12 @@ flag.
This
option is useful for making a
.Em checkpoint
of your current editing phase. The same flags will be passed to delta
of your current editing phase.
The same flags will be passed to
.Nm delta
as described above, and
all the flags listed for
.om get
.Nm get
above except
.Fl e
and
@ -148,35 +143,38 @@ and
are
passed to
.Nm edit .
.It Cm create
.It Ic create
Creates
an
.Li SCCS
file ,
.Tn SCCS
file,
taking
the initial contents from the file of the same name.
Any
flags to
.Nm admin
are accepted. If the creation is successful,
are accepted.
If the creation is successful,
the files are renamed with a comma on the front.
These should be removed when you are convinced that the
.Li SCCS
.Tn SCCS
files
have been created successfully.
.It Cm fix
.It Ic fix
Must
be followed by a
.Fl r
flag.
This command essentially removes the named delta, but
leaves you with a copy of the delta
with the changes that were in it. It
is useful for fixing small compiler bugs, etc.
Since it doesn't leave audit trails, it should be used carefully.
.It Cm clean
with the changes that were in it.
It is useful for fixing small compiler bugs, etc.
Since it does not leave audit trails, it should be used carefully.
.It Ic clean
This routine removes everything from the current directory
that can be recreated from SCCS files.
that can be recreated from
.Tn SCCS
files.
It will not remove any files being edited.
If the
.Fl b
@ -184,40 +182,42 @@ flag is given, branches are ignored in the determination of
whether they are being edited; this
is dangerous if you are keeping the branches in the
same directory.
.It Cm unedit
.It Ic unedit
This
is the opposite of an
.Nm edit
or
a
.Dq Li get \-e .
or a
.Nm get Fl e .
It should be used with extreme caution, since
any changes you made since the get will be irretrievably lost.
.It Cm info
any changes you made since the
.Nm get
will be irretrievably lost.
.It Ic info
Gives a listing of all files being edited.
If the
.Fl b
flag
is given, branches (i.e.,
.Li SID Ns \&\'s
is given, branches (i.e., SID's
with two or fewer components)
are ignored. If the
are ignored.
If the
.Fl u
flag is given (with an optional argument) then
only files being edited by you (or the named user) are listed.
.It Cm check
.It Ic check
Like
.Nm info
except that nothing is printed if nothing is being edited, and
a non-zero exit status is returned if anything is being edited.
The intent is to have this included in an
.Em install
.Cm install
entry in a makefile to insure that everything is included into the
.Li SCCS
.Tn SCCS
file before a version is installed.
.It Cm tell
.It Ic tell
Gives a newline-separated list of the files being edited
on the standard output. Takes the
on the standard output.
Takes the
.Fl b
and
.Fl u
@ -225,45 +225,32 @@ flags like
.Nm info
and
.Nm check .
.It Cm diffs
.It Ic diffs
Gives a
.Nm diff
.Xr diff 1
listing between the current version of the
program(s) you have out for editing and the versions in
.Li SCCS
.Tn SCCS
format.
The
.Fl r ,
.Fl c ,
.Fl i ,
.Fl x ,
.Fl r , c , i , x ,
and
.Fl t
flags are passed to
.if n \{\
. br
.\}
.Nm get ;
the
.Fl l ,
.Fl s ,
.Fl e ,
.Fl f ,
.Fl h ,
.Fl l , s , e , f , h ,
and
.Fl b
options are passed to
.if n \{\
. br
.\}
.Nm diff .
.Xr diff 1 .
The
.Fl C
flag is passed to
.Nm diff
.Xr diff 1
as
.Fl c .
.It Cm print
.It Ic print
This command prints out verbose information
about the named files.
.Pp
@ -273,24 +260,24 @@ Runs
as the real user rather than as whatever effective user
.Nm
is
.Dq Li set user id
.Dq set-user-ID
to.
.It Fl d
Specifies a root directory for the
.Li SCCS
.Tn SCCS
files.
The default is the current directory.
If environment variable
.Ev PROJECT
is set,
it will be used to determine the
it will be used to determine the
.Fl d
flag.
.It Fl p
Defines the pathname of the directory in which the
.Li SCCS
.Tn SCCS
files will be found;
.Dq Li SCCS
.Dq Tn SCCS
is the default.
The
.Fl p
@ -304,77 +291,81 @@ argument is prepended to the entire pathname and the
.Fl p
argument is inserted before the final component of the pathname.
For example,
.Dq Li sccs \-d/x \-py get a/b
.Dq Li "sccs -d/x -py get a/b"
will convert to
.Dq Li get /x/a/y/s.b .
.Dq Li "get /x/a/y/s.b" .
The intent here is to create aliases such as
.Dq Li alias syssccs sccs -d/usr/src
.Dq Li "alias syssccs sccs -d/usr/src"
which
will be used as
.Dq Li syssccs get cmd/who.c .
.Dq Li "syssccs get cmd/who.c" .
.El
.Pp
Certain
commands (such as
.Nm admin )
.Nm admin )
cannot be run
.Dq Li set user id
.Dq set-user-ID
by all users, since this would allow anyone to change the authorizations.
These commands are always run as the real user.
.Sh EXAMPLES
To get a file for editing,
edit it,
and produce a new delta:
.Pp
.Dl sccs get \-e file.c
.Dl ex file.c
.Dl sccs delta file.c
.Bd -literal -offset indent
sccs get -e file.c
ex file.c
sccs delta file.c
.Ed
.Pp
To get a file from another directory:
.Pp
.Dl sccs \-p/usr/src/sccs/s. get cc.c
.Dl "sccs -p/usr/src/sccs/s. get cc.c"
.Pp
or
.Pp
.Dl sccs get /usr/src/sccs/s.cc.c
.Dl "sccs get /usr/src/sccs/s.cc.c"
.Pp
To make a delta of a large number of files
in the current directory:
.Pp
.Dl sccs delta *.c
.Dl "sccs delta *.c"
.Pp
To get a list of files being edited that are not on branches:
.Pp
.Dl sccs info \-b
.Dl "sccs info -b"
.Pp
To delta everything being edited by you:
.Pp
.Dl sccs delta \`sccs tell \-u\`
.Dl "sccs delta `sccs tell -u`"
.Pp
In a makefile, to get source files
from an
.Li SCCS
.Tn SCCS
file if it does not already exist:
.Pp
.Dl SRCS = <list of source files>
.Dl $(SRCS):
.Dl \&\tsccs get $(REL) $@
.Bd -literal -offset indent
SRCS = <list of source files>
$(SRCS):
sccs get $(REL) $@
.Ed
.Sh ENVIRONMENT
.Bl -tag -width Ar
.Bl -tag -width ".Ev PROJECT"
.It Ev PROJECT
The PROJECT environment variable is checked by the
The
.Ev PROJECT
environment variable is checked by the
.Fl d
flag. If
it begins with a slash, it is taken directly; otherwise,
flag.
If it begins with a slash, it is taken directly; otherwise,
the home directory of a user of that name is
examined for a subdirectory
.Dq Li src
.Pa src
or
.Dq Li source .
.Pa source .
If such a directory is found, it is used.
.El
.Sh SEE ALSO
.Xr what 1
.Xr what 1 ,
.Xr admin SCCS ,
.Xr chghist SCCS ,
.Xr comb SCCS ,
@ -383,7 +374,7 @@ If such a directory is found, it is used.
.Xr help SCCS ,
.Xr prt SCCS ,
.Xr rmdel SCCS ,
.Xr sccsdiff SCCS ,
.Xr sccsdiff SCCS
.Rs
.%A Eric Allman
.%T "An Introduction to the Source Code Control System"
@ -397,5 +388,5 @@ appeared in
.Sh BUGS
It should be able to take directory arguments on pseudo-commands
like the
.Li SCCS
.Tn SCCS
commands do.