bring up to rev 5
[unix-history] / usr / src / usr.bin / sccs / sccs.1
CommitLineData
e1920121
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
4c875902 5.\" @(#)sccs.1 2.5 (Berkeley) %G%
e1920121
KM
6.\"
7.TH SCCS 1 ""
8.UC 5
39ae1365 9.SH NAME
ead69411 10sccs \- front end for the \s-1SCCS\s0 subsystem
39ae1365
EA
11.SH SYNOPSIS
12.B sccs
13[
14.B \-r
15] [
e5b52011 16.BI \-d path
c3a8e591
EA
17] [
18.BI \-p path
39ae1365
EA
19] command [ flags ] [ args ]
20.SH DESCRIPTION
21.I Sccs
22is a front end
2de7ab2b
EA
23to the
24.SM SCCS
25programs
4c875902 26that helps them mesh more cleanly
39ae1365 27with the rest of UNIX.
af83554c
EA
28It also includes the capability to run
29``set user id'' to another user
30to provide additional protection.
39ae1365
EA
31.PP
32Basically,
33.I sccs
34runs the
35.I command
36with the specified
37.I flags
38and
39.I args.
40Each
41argument
c3a8e591
EA
42is normally modified to be prepended
43with ``SCCS/s.''.
39ae1365
EA
44.PP
45Flags to be interpreted by the
46.I sccs
47program must be before the
48.I command
49argument.
50Flags to be passed to the actual
51.SM SCCS
52program
53must come after the
54.I command
55argument.
56These flags are specific to the command
57and are discussed in the documentation for that command.
58.PP
9e6171bb
EA
59Besides the usual
60.SM SCCS
61commands,
62several ``pseudo-commands'' can be issued.
63These are:
94d25808
EA
64.IP edit 1i
65Equivalent to ``get \-e''.
66.IP delget
9e6171bb
EA
67Perform a delta on the named files
68and then get new versions.
69The new versions will have id keywords expanded,
70and will not be editable.
1087bf95
EA
71The \-m, \-p, \-r, \-s, and \-y flags
72will be passed to delta,
73and the \-b, \-c, \-e, \-i, \-k, \-l, \-s, and \-x flags
74will be passed to get.
b7991d06 75.IP deledit
94d25808
EA
76Equivalent to ``delget'' except that the
77``get'' phase includes the ``\-e'' flag.
78This option is useful for making a ``checkpoint''
c3a8e591 79of your current editing phase.
1087bf95
EA
80The same flags will be passed to delta
81as described above,
82and all the flags listed for ``get''
83above except \-e and \-k
84are passed to ``edit''.
9be60522
EA
85.IP create
86Creates an
87.SM SCCS
88file,
89taking the initial contents from the file of the same name.
90Any flags to ``admin'' are accepted.
91If the creation is successful,
92the files are renamed with a comma on the front.
93These should be removed when you are convinced that
94the
95.SM SCCS
96files have been created successfully.
9e6171bb
EA
97.IP fix
98Must be followed by a
99.B \-r
100flag.
101This command essentially removes the named delta,
102but leaves you with a copy of the delta
103with the changes that were in it.
104It is useful for fixing small compiler bugs, etc.
105Since it doesn't leave audit trails,
106it should be used carefully.
107.IP clean
9e6171bb
EA
108This routine removes everything from the current directory
109that can be recreated from SCCS files.
c3a8e591 110It will not remove any files being edited.
28ad8b5d
EA
111If the
112.B \-b
113flag is given, branches are ignored in the determination
114of whether they are being edited;
115this is dangerous if you are keeping the branches in the
116same directory.
9ef9beda
EA
117.IP unedit
118This is the opposite of an ``edit''
119or a ``get \-e''.
120It should be used with extreme caution,
121since any changes you made since the get
122will be irretrievably lost.
94d25808 123.IP info
c3a8e591 124Gives a listing of all files being edited.
28ad8b5d
EA
125If the
126.B \-b
127flag is given,
128branches (i.e.,
129\s-1SID\s0's with two or fewer components)
130are ignored.
6aac25be
EA
131If the
132.B \-u
133flag is given
134(with an optional argument)
135then only files being edited by you
136(or the named user)
137are listed.
a2a3f7d9
EA
138.IP check
139Like ``info''
140except that nothing is printed if nothing is being edited,
141and a non-zero exit status is returned if anything
142is being edited.
143The intent is to have this included in an ``install''
144entry in a makefile
145to insure that everything is included into the
146.SM SCCS
147file
148before a version is installed.
aad1cfb4
EA
149.IP tell
150Gives a newline-separated list
151of the files being edited
152on the standard output.
28ad8b5d
EA
153Takes the
154.B \-b
6aac25be
EA
155and
156.B \-u
157flags like
28ad8b5d 158``info'' and ``check''.
ecf8b19b
EA
159.IP diffs
160Gives a ``diff'' listing between the current version of the
161program(s) you have out for editing and the versions
162in
163.SM SCCS
164format.
63fe484d
EA
165The
166.B \-r,
167.B \-c,
168.B \-i,
169.B \-x,
170and
171.B \-t
172flags are passed to
173.I get\c
174; the
175.B \-l,
176.B \-s,
177.B \-e,
178.B \-f,
179.B \-h,
180and
181.B \-b
182options are passed to
183.I diff.
184The
185.B \-C
186flag is passed to
187.I diff
188as
189.B \-c.
23320296
EA
190.IP print
191This command prints out verbose information
192about the named files.
9e6171bb 193.PP
39ae1365
EA
194The
195.B \-r
196flag runs
197.I sccs
198as the real user
af83554c
EA
199rather than as whatever effective user
200.I sccs
201is ``set user id'' to.
39ae1365 202The
c3a8e591
EA
203.B \-d
204flag gives a root directory for the
205.SM SCCS
206files.
207The default is the current directory.
208The
39ae1365 209.B \-p
70caf673 210flag defines the pathname of the directory
c3a8e591 211in which the
39ae1365 212.SM SCCS
c3a8e591 213files will be found;
70caf673 214``SCCS'' is the default.
e5b52011 215The
e5b52011 216.B \-p
c3a8e591
EA
217flag differs from the
218.B \-d
219flag in that the
e5b52011
EA
220.B \-d
221argument is prepended to the entire pathname
222and the
223.B \-p
224argument is inserted before the final component of the
225pathname.
226For example,
2fd4f820 227``sccs \-d/x \-py get a/b''
e5b52011
EA
228will convert to
229``get /x/a/y/s.b''.
230The intent here is to create aliases such as
231``alias syssccs sccs -d/usr/src''
232which will be used as
233``syssccs get cmd/who.c''.
2fd4f820
EA
234Also, if the environment variable
235PROJECT
236is set,
237its value is used to determine the
238.B \-d flag.
239If it begins with a slash,
240it is taken directly;
241otherwise,
242the home directory of a user of that name
243is examined for a subdirectory ``src'' or ``source''.
244If such a directory is found,
245it is used.
70caf673
EA
246.PP
247Certain commands (such as
248.IR admin )
af83554c
EA
249cannot be run ``set user id'' by all users,
250since this would allow anyone to change the authorizations.
251These commands are always run as the real user.
39ae1365
EA
252.SH EXAMPLES
253.de BX
813d780e 254.PP
39ae1365
EA
255.nf
256.in +0.5i
39ae1365
EA
257..
258.de EX
259.fi
813d780e 260.PP
39ae1365 261..
c3a8e591 262To get a file for editing,
39ae1365
EA
263edit it,
264and produce a new delta:
265.BX
2de7ab2b
EA
266sccs get \-e file.c
267ex file.c
268sccs delta file.c
39ae1365
EA
269.EX
270To get a file from another directory:
271.BX
2de7ab2b 272sccs \-p/usr/src/sccs/s. get cc.c
39ae1365
EA
273.EX
274or
275.BX
2de7ab2b 276sccs get /usr/src/sccs/s.cc.c
39ae1365
EA
277.EX
278To make a delta of a large number of files
279in the current directory:
280.BX
2de7ab2b 281sccs delta *.c
39ae1365 282.EX
6aac25be
EA
283To get a list of files being edited that are not on branches:
284.BX
285sccs info \-b
286.EX
287To delta everything being edited by you:
288.BX
289sccs delta \`sccs tell \-u\`
290.EX
39ae1365
EA
291In a makefile, to get source files
292from an
293.SM SCCS
294file if it does not already exist:
295.BX
296SRCS = <list of source files>
70caf673
EA
297$(SRCS):
298 sccs get $(REL) $@
39ae1365
EA
299.EX
300.SH "SEE ALSO"
301admin(SCCS),
302chghist(SCCS),
303comb(SCCS),
304delta(SCCS),
305get(SCCS),
306help(SCCS),
307prt(SCCS),
308rmdel(SCCS),
309sccsdiff(SCCS),
813d780e
EA
310what(SCCS)
311.br
312Eric Allman,
313.ul
314An Introduction to the Source Code Control System
d35f5db1
EA
315.SH BUGS
316It should be able to take directory arguments on pseudo-commands
317like the
318.SM SCCS
319commands do.