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