Added "diffs" command
[unix-history] / usr / src / usr.bin / sccs / sccs.1
CommitLineData
a2a3f7d9 1.TH SCCS LOCAL
797b9789 2.UC
39ae1365
EA
3.SH NAME
4sccs \- front end for the
5.SM SCCS
6subsystem
7.SH SYNOPSIS
8.B sccs
9[
10.B \-r
11] [
e5b52011 12.BI \-d path
c3a8e591
EA
13] [
14.BI \-p path
39ae1365
EA
15] command [ flags ] [ args ]
16.SH DESCRIPTION
17.I Sccs
18is a front end
2de7ab2b
EA
19to the
20.SM SCCS
21programs
22that help them mesh more cleanly
39ae1365 23with the rest of UNIX.
af83554c
EA
24It also includes the capability to run
25``set user id'' to another user
26to provide additional protection.
39ae1365
EA
27.PP
28Basically,
29.I sccs
30runs the
31.I command
32with the specified
33.I flags
34and
35.I args.
36Each
37argument
c3a8e591
EA
38is normally modified to be prepended
39with ``SCCS/s.''.
39ae1365
EA
40.PP
41Flags to be interpreted by the
42.I sccs
43program must be before the
44.I command
45argument.
46Flags to be passed to the actual
47.SM SCCS
48program
49must come after the
50.I command
51argument.
52These flags are specific to the command
53and are discussed in the documentation for that command.
54.PP
9e6171bb
EA
55Besides the usual
56.SM SCCS
57commands,
58several ``pseudo-commands'' can be issued.
59These are:
94d25808
EA
60.IP edit 1i
61Equivalent to ``get \-e''.
62.IP delget
9e6171bb
EA
63Perform a delta on the named files
64and then get new versions.
65The new versions will have id keywords expanded,
66and will not be editable.
1087bf95
EA
67The \-m, \-p, \-r, \-s, and \-y flags
68will be passed to delta,
69and the \-b, \-c, \-e, \-i, \-k, \-l, \-s, and \-x flags
70will be passed to get.
b7991d06 71.IP deledit
94d25808
EA
72Equivalent to ``delget'' except that the
73``get'' phase includes the ``\-e'' flag.
74This option is useful for making a ``checkpoint''
c3a8e591 75of your current editing phase.
1087bf95
EA
76The same flags will be passed to delta
77as described above,
78and all the flags listed for ``get''
79above except \-e and \-k
80are passed to ``edit''.
9e6171bb
EA
81.IP fix
82Must be followed by a
83.B \-r
84flag.
85This command essentially removes the named delta,
86but leaves you with a copy of the delta
87with the changes that were in it.
88It is useful for fixing small compiler bugs, etc.
89Since it doesn't leave audit trails,
90it should be used carefully.
91.IP clean
92Takes no arguments.
93This routine removes everything from the current directory
94that can be recreated from SCCS files.
c3a8e591 95It will not remove any files being edited.
9ef9beda
EA
96.IP unedit
97This is the opposite of an ``edit''
98or a ``get \-e''.
99It should be used with extreme caution,
100since any changes you made since the get
101will be irretrievably lost.
94d25808 102.IP info
c3a8e591 103Gives a listing of all files being edited.
a2a3f7d9
EA
104.IP check
105Like ``info''
106except that nothing is printed if nothing is being edited,
107and a non-zero exit status is returned if anything
108is being edited.
109The intent is to have this included in an ``install''
110entry in a makefile
111to insure that everything is included into the
112.SM SCCS
113file
114before a version is installed.
9e6171bb 115.PP
39ae1365
EA
116The
117.B \-r
118flag runs
119.I sccs
120as the real user
af83554c
EA
121rather than as whatever effective user
122.I sccs
123is ``set user id'' to.
39ae1365 124The
c3a8e591
EA
125.B \-d
126flag gives a root directory for the
127.SM SCCS
128files.
129The default is the current directory.
130The
39ae1365 131.B \-p
70caf673 132flag defines the pathname of the directory
c3a8e591 133in which the
39ae1365 134.SM SCCS
c3a8e591 135files will be found;
70caf673 136``SCCS'' is the default.
e5b52011 137The
e5b52011 138.B \-p
c3a8e591
EA
139flag differs from the
140.B \-d
141flag in that the
e5b52011
EA
142.B \-d
143argument is prepended to the entire pathname
144and the
145.B \-p
146argument is inserted before the final component of the
147pathname.
148For example,
149``sccs -d/x -py get a/b''
150will convert to
151``get /x/a/y/s.b''.
152The intent here is to create aliases such as
153``alias syssccs sccs -d/usr/src''
154which will be used as
155``syssccs get cmd/who.c''.
70caf673
EA
156.PP
157Certain commands (such as
158.IR admin )
af83554c
EA
159cannot be run ``set user id'' by all users,
160since this would allow anyone to change the authorizations.
161These commands are always run as the real user.
39ae1365
EA
162.SH EXAMPLES
163.de BX
813d780e 164.PP
39ae1365
EA
165.nf
166.in +0.5i
39ae1365
EA
167..
168.de EX
169.fi
813d780e 170.PP
39ae1365 171..
c3a8e591 172To get a file for editing,
39ae1365
EA
173edit it,
174and produce a new delta:
175.BX
2de7ab2b
EA
176sccs get \-e file.c
177ex file.c
178sccs delta file.c
39ae1365
EA
179.EX
180To get a file from another directory:
181.BX
2de7ab2b 182sccs \-p/usr/src/sccs/s. get cc.c
39ae1365
EA
183.EX
184or
185.BX
2de7ab2b 186sccs get /usr/src/sccs/s.cc.c
39ae1365
EA
187.EX
188To make a delta of a large number of files
189in the current directory:
190.BX
2de7ab2b 191sccs delta *.c
39ae1365
EA
192.EX
193In a makefile, to get source files
194from an
195.SM SCCS
196file if it does not already exist:
197.BX
198SRCS = <list of source files>
70caf673
EA
199$(SRCS):
200 sccs get $(REL) $@
39ae1365
EA
201.EX
202.SH "SEE ALSO"
203admin(SCCS),
204chghist(SCCS),
205comb(SCCS),
206delta(SCCS),
207get(SCCS),
208help(SCCS),
209prt(SCCS),
210rmdel(SCCS),
211sccsdiff(SCCS),
813d780e
EA
212what(SCCS)
213.br
214Eric Allman,
215.ul
216An Introduction to the Source Code Control System
39ae1365
EA
217.SH DISCLAIMER
218Since it is not yet clear
219what this program should do,
220it should not be considered
221a stable program product.
222Please send any
c3a8e591
EA
223comments & suggestions
224to csvax:eric.