date and time created 81/01/07 16:55:48 by mckusick
[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
9e6171bb
EA
92This routine removes everything from the current directory
93that can be recreated from SCCS files.
c3a8e591 94It will not remove any files being edited.
28ad8b5d
EA
95If the
96.B \-b
97flag is given, branches are ignored in the determination
98of whether they are being edited;
99this is dangerous if you are keeping the branches in the
100same directory.
9ef9beda
EA
101.IP unedit
102This is the opposite of an ``edit''
103or a ``get \-e''.
104It should be used with extreme caution,
105since any changes you made since the get
106will be irretrievably lost.
94d25808 107.IP info
c3a8e591 108Gives a listing of all files being edited.
28ad8b5d
EA
109If the
110.B \-b
111flag is given,
112branches (i.e.,
113\s-1SID\s0's with two or fewer components)
114are ignored.
6aac25be
EA
115If the
116.B \-u
117flag is given
118(with an optional argument)
119then only files being edited by you
120(or the named user)
121are listed.
a2a3f7d9
EA
122.IP check
123Like ``info''
124except that nothing is printed if nothing is being edited,
125and a non-zero exit status is returned if anything
126is being edited.
127The intent is to have this included in an ``install''
128entry in a makefile
129to insure that everything is included into the
130.SM SCCS
131file
132before a version is installed.
aad1cfb4
EA
133.IP tell
134Gives a newline-separated list
135of the files being edited
136on the standard output.
28ad8b5d
EA
137Takes the
138.B \-b
6aac25be
EA
139and
140.B \-u
141flags like
28ad8b5d 142``info'' and ``check''.
ecf8b19b
EA
143.IP diffs
144Gives a ``diff'' listing between the current version of the
145program(s) you have out for editing and the versions
146in
147.SM SCCS
148format.
63fe484d
EA
149The
150.B \-r,
151.B \-c,
152.B \-i,
153.B \-x,
154and
155.B \-t
156flags are passed to
157.I get\c
158; the
159.B \-l,
160.B \-s,
161.B \-e,
162.B \-f,
163.B \-h,
164and
165.B \-b
166options are passed to
167.I diff.
168The
169.B \-C
170flag is passed to
171.I diff
172as
173.B \-c.
9e6171bb 174.PP
39ae1365
EA
175The
176.B \-r
177flag runs
178.I sccs
179as the real user
af83554c
EA
180rather than as whatever effective user
181.I sccs
182is ``set user id'' to.
39ae1365 183The
c3a8e591
EA
184.B \-d
185flag gives a root directory for the
186.SM SCCS
187files.
188The default is the current directory.
189The
39ae1365 190.B \-p
70caf673 191flag defines the pathname of the directory
c3a8e591 192in which the
39ae1365 193.SM SCCS
c3a8e591 194files will be found;
70caf673 195``SCCS'' is the default.
e5b52011 196The
e5b52011 197.B \-p
c3a8e591
EA
198flag differs from the
199.B \-d
200flag in that the
e5b52011
EA
201.B \-d
202argument is prepended to the entire pathname
203and the
204.B \-p
205argument is inserted before the final component of the
206pathname.
207For example,
208``sccs -d/x -py get a/b''
209will convert to
210``get /x/a/y/s.b''.
211The intent here is to create aliases such as
212``alias syssccs sccs -d/usr/src''
213which will be used as
214``syssccs get cmd/who.c''.
70caf673
EA
215.PP
216Certain commands (such as
217.IR admin )
af83554c
EA
218cannot be run ``set user id'' by all users,
219since this would allow anyone to change the authorizations.
220These commands are always run as the real user.
39ae1365
EA
221.SH EXAMPLES
222.de BX
813d780e 223.PP
39ae1365
EA
224.nf
225.in +0.5i
39ae1365
EA
226..
227.de EX
228.fi
813d780e 229.PP
39ae1365 230..
c3a8e591 231To get a file for editing,
39ae1365
EA
232edit it,
233and produce a new delta:
234.BX
2de7ab2b
EA
235sccs get \-e file.c
236ex file.c
237sccs delta file.c
39ae1365
EA
238.EX
239To get a file from another directory:
240.BX
2de7ab2b 241sccs \-p/usr/src/sccs/s. get cc.c
39ae1365
EA
242.EX
243or
244.BX
2de7ab2b 245sccs get /usr/src/sccs/s.cc.c
39ae1365
EA
246.EX
247To make a delta of a large number of files
248in the current directory:
249.BX
2de7ab2b 250sccs delta *.c
39ae1365 251.EX
6aac25be
EA
252To get a list of files being edited that are not on branches:
253.BX
254sccs info \-b
255.EX
256To delta everything being edited by you:
257.BX
258sccs delta \`sccs tell \-u\`
259.EX
39ae1365
EA
260In a makefile, to get source files
261from an
262.SM SCCS
263file if it does not already exist:
264.BX
265SRCS = <list of source files>
70caf673
EA
266$(SRCS):
267 sccs get $(REL) $@
39ae1365
EA
268.EX
269.SH "SEE ALSO"
270admin(SCCS),
271chghist(SCCS),
272comb(SCCS),
273delta(SCCS),
274get(SCCS),
275help(SCCS),
276prt(SCCS),
277rmdel(SCCS),
278sccsdiff(SCCS),
813d780e
EA
279what(SCCS)
280.br
281Eric Allman,
282.ul
283An Introduction to the Source Code Control System
d35f5db1
EA
284.SH BUGS
285It should be able to take directory arguments on pseudo-commands
286like the
287.SM SCCS
288commands do.
39ae1365
EA
289.SH DISCLAIMER
290Since it is not yet clear
291what this program should do,
292it should not be considered
293a stable program product.
294Please send any
c3a8e591
EA
295comments & suggestions
296to csvax:eric.