Removed a disgusting wart that attempts to verify that the data in the
[unix-history] / usr.bin / sccs / sccs.1
CommitLineData
15637ed4
RG
1.\" Copyright (c) 1983, 1990 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\" must display the following acknowledgement:
14.\" This product includes software developed by the University of
15.\" California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\" may be used to endorse or promote products derived from this software
18.\" without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)sccs.1 2.10 (Berkeley) 7/24/91
33.\"
34.Dd July 24, 1991
35.Dt SCCS 1
36.Os BSD 4.2
37.Sh NAME
38.Nm sccs
39.Nd front end for the
40.Li SCCS
41subsystem
42.Sh SYNOPSIS
43.Nm sccs
44.Op Fl r
45.Op Fl d Ar path
46.Op Fl p Ar path
47.Ar command
48.Op flags
49.Op Ar
50.Sh DESCRIPTION
51.Nm Sccs
52is a front end to the
53.Li SCCS
54programs
55that
56helps them mesh more cleanly
57with
58the rest of UNIX.
59It
60also includes the capability to run
61.Dq set user id
62to another user
63to
64provide additional protection.
65.Pp
66Basically,
67.Nm sccs
68runs the command with the specified
69.Ar flags
70and
71.Ar args .
72Each argument is normally modified to be prepended with
73.Dq Li SCCS/s. .
74.Pp
75Flags to be interpreted by the
76.Nm sccs
77program must be before the
78.Ar command
79argument.
80Flags to be passed to the actual
81.Li SCCS
82program must come after the
83.Ar command
84argument.
85These flags are specific to the command and
86are discussed in the documentation for that command.
87.Pp
88Besides the usual
89.Li SCCS
90commands,
91several
92.Dq pseudo-commands
93can be issued.
94These are:
95.Bl -tag -width deledit
96.It Cm edit
97Equivalent
98to
99.Dq Li get \-e .
100.It Cm delget
101Perform a delta on the named files and
102then get new versions.
103The new versions will have id keywords expanded, and
104will not be editable.
105The
106.Fl m ,
107.Fl p ,
108.Fl r ,
109.Fl s ,
110and
111.Fl y
112flags will be passed to
113.Nm delta ,
114and the
115.Fl b,
116.Fl c ,
117.Fl e ,
118.Fl i ,
119.Fl k ,
120.Fl l ,
121.Fl s ,
122.\" anybody who has a bad xterm which is almost anyone
123and
124.Fl x
125flags will be passed to get.
126.It Cm deledit
127Equivalent
128to
129.Nm delget
130except that the
131.Nm get
132phase includes the
133.Fl e
134flag.
135This
136option is useful for making a
137.Em checkpoint
138of your current editing phase. The same flags will be passed to delta
139as described above, and
140all the flags listed for
141.om get
142above except
143.Fl e
144and
145.Fl k
146are
147passed to
148.Nm edit .
149.It Cm create
150Creates
151an
152.Li SCCS
153file ,
154taking
155the initial contents from the file of the same name.
156Any
157flags to
158.Nm admin
159are accepted. If the creation is successful,
160the files are renamed with a comma on the front.
161These should be removed when you are convinced that the
162.Li SCCS
163files
164have been created successfully.
165.It Cm fix
166Must
167be followed by a
168.Fl r
169flag.
170This command essentially removes the named delta, but
171leaves you with a copy of the delta
172with the changes that were in it. It
173is useful for fixing small compiler bugs, etc.
174Since it doesn't leave audit trails, it should be used carefully.
175.It Cm clean
176This routine removes everything from the current directory
177that can be recreated from SCCS files.
178It will not remove any files being edited.
179If the
180.Fl b
181flag is given, branches are ignored in the determination of
182whether they are being edited; this
183is dangerous if you are keeping the branches in the
184same directory.
185.It Cm unedit
186This
187is the opposite of an
188.Nm edit
189or
190a
191.Dq Li get \-e .
192It should be used with extreme caution, since
193any changes you made since the get will be irretrievably lost.
194.It Cm info
195Gives a listing of all files being edited.
196If the
197.Fl b
198flag
199is given, branches (i.e.,
200.Li SID Ns \&\'s
201with two or fewer components)
202are ignored. If the
203.Fl u
204flag is given (with an optional argument) then
205only files being edited by you (or the named user) are listed.
206.It Cm check
207Like
208.Nm info
209except that nothing is printed if nothing is being edited, and
210a non-zero exit status is returned if anything is being edited.
211The intent is to have this included in an
212.Em install
213entry in a makefile to insure that everything is included into the
214.Li SCCS
215file before a version is installed.
216.It Cm tell
217Gives a newline-separated list of the files being edited
218on the standard output. Takes the
219.Fl b
220and
221.Fl u
222flags like
223.Nm info
224and
225.Nm check .
226.It Cm diffs
227Gives a
228.Nm diff
229listing between the current version of the
230program(s) you have out for editing and the versions in
231.Li SCCS
232format.
233The
234.Fl r ,
235.Fl c ,
236.Fl i ,
237.Fl x ,
238and
239.Fl t
240flags are passed to
241.if n \{\
242. br
243.\}
244.Nm get ;
245the
246.Fl l ,
247.Fl s ,
248.Fl e ,
249.Fl f ,
250.Fl h ,
251and
252.Fl b
253options are passed to
254.if n \{\
255. br
256.\}
257.Nm diff .
258The
259.Fl C
260flag is passed to
261.Nm diff
262as
263.Fl c .
264.It Cm print
265This command prints out verbose information
266about the named files.
267.Pp
268.It Fl r
269Runs
270.Nm sccs
271as the real user rather than as whatever effective user
272.Nm sccs
273is
274.Dq Li set user id
275to.
276.It Fl d
277Specifies a root directory for the
278.Li SCCS
279files.
280The default is the current directory.
281If environment variable
282.Ev PROJECT
283is set,
284it will be used to determine the
285.Fl d
286flag.
287.It Fl p
288Defines the pathname of the directory in which the
289.Li SCCS
290files will be found;
291.Dq Li SCCS
292is the default.
293The
294.Fl p
295flag
296differs from the
297.Fl d
298flag
299in that the
300.Fl d
301argument is prepended to the entire pathname and the
302.Fl p
303argument is inserted before the final component of the pathname.
304For example,
305.Dq Li sccs \-d/x \-py get a/b
306will convert to
307.Dq Li get /x/a/y/s.b .
308The intent here is to create aliases such as
309.Dq Li alias syssccs sccs -d/usr/src
310which
311will be used as
312.Dq Li syssccs get cmd/who.c .
313.Pp
314Certain
315commands (such as
316.Nm admin )
317cannot be run
318.Dq Li set user id
319by all users, since this would allow anyone to change the authorizations.
320These commands are always run as the real user.
321.Sh EXAMPLES
322To get a file for editing,
323edit it,
324and produce a new delta:
325.Pp
326.Dl sccs get \-e file.c
327.Dl ex file.c
328.Dl sccs delta file.c
329.Pp
330To get a file from another directory:
331.Pp
332.Dl sccs \-p/usr/src/sccs/s. get cc.c
333.Pp
334or
335.Pp
336.Dl sccs get /usr/src/sccs/s.cc.c
337.Pp
338To make a delta of a large number of files
339in the current directory:
340.Pp
341.Dl sccs delta *.c
342.Pp
343To get a list of files being edited that are not on branches:
344.Pp
345.Dl sccs info \-b
346.Pp
347To delta everything being edited by you:
348.Pp
349.Dl sccs delta \`sccs tell \-u\`
350.Pp
351In a makefile, to get source files
352from an
353.Li SCCS
354file if it does not already exist:
355.Pp
356.Dl SRCS = <list of source files>
357.Dl $(SRCS):
358.Dl \&\tsccs get $(REL) $@
359.Sh ENVIRONMENT
360.Bl -tag -width Ar
361.It Ev PROJECT
362The PROJECT environment variable is checked by the
363.Fl d
364flag. If
365it begins with a slash, it is taken directly; otherwise,
366the home directory of a user of that name is
367examined for a subdirectory
368.Dq Li src
369or
370.Dq Li source .
371If such a directory is found, it is used.
372.El
373.Sh SEE ALSO
374.Xr what 1
375.Xr admin SCCS ,
376.Xr chghist SCCS ,
377.Xr comb SCCS ,
378.Xr delta SCCS ,
379.Xr get SCCS ,
380.Xr help SCCS ,
381.Xr prt SCCS ,
382.Xr rmdel SCCS ,
383.Xr sccsdiff SCCS ,
384.Rs
385.%A Eric Allman
386.%T "An Introduction to the Source Code Control System"
387.Re
388.Sh HISTORY
389The
390.Nm sccs
391command
392appeared in
393.Bx 4.3 .
394.Sh BUGS
395It should be able to take directory arguments on pseudo-commands
396like the
397.Li SCCS
398commands do.