must rm before ln
[unix-history] / usr / src / usr.bin / sccs / sccs.1
... / ...
CommitLineData
1.TH SCCS LOCAL
2.UC
3.SH NAME
4sccs \- front end for the
5.SM SCCS
6subsystem
7.SH SYNOPSIS
8.B sccs
9[
10.B \-r
11] [
12.BI \-d path
13] [
14.BI \-p path
15] command [ flags ] [ args ]
16.SH DESCRIPTION
17.I Sccs
18is a front end
19to the
20.SM SCCS
21programs
22that help them mesh more cleanly
23with the rest of UNIX.
24It also includes the capability to run
25``set user id'' to another user
26to provide additional protection.
27.PP
28Basically,
29.I sccs
30runs the
31.I command
32with the specified
33.I flags
34and
35.I args.
36Each
37argument
38is normally modified to be prepended
39with ``SCCS/s.''.
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
55Besides the usual
56.SM SCCS
57commands,
58several ``pseudo-commands'' can be issued.
59These are:
60.IP edit 1i
61Equivalent to ``get \-e''.
62.IP delget
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.
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.
71.IP deledit
72Equivalent to ``delget'' except that the
73``get'' phase includes the ``\-e'' flag.
74This option is useful for making a ``checkpoint''
75of your current editing phase.
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''.
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.
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
104This routine removes everything from the current directory
105that can be recreated from SCCS files.
106It will not remove any files being edited.
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.
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.
119.IP info
120Gives a listing of all files being edited.
121If the
122.B \-b
123flag is given,
124branches (i.e.,
125\s-1SID\s0's with two or fewer components)
126are ignored.
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.
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.
145.IP tell
146Gives a newline-separated list
147of the files being edited
148on the standard output.
149Takes the
150.B \-b
151and
152.B \-u
153flags like
154``info'' and ``check''.
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.
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.
186.IP print
187This command prints out verbose information
188about the named files.
189.PP
190The
191.B \-r
192flag runs
193.I sccs
194as the real user
195rather than as whatever effective user
196.I sccs
197is ``set user id'' to.
198The
199.B \-d
200flag gives a root directory for the
201.SM SCCS
202files.
203The default is the current directory.
204The
205.B \-p
206flag defines the pathname of the directory
207in which the
208.SM SCCS
209files will be found;
210``SCCS'' is the default.
211The
212.B \-p
213flag differs from the
214.B \-d
215flag in that the
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,
223``sccs \-d/x \-py get a/b''
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''.
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.
242.PP
243Certain commands (such as
244.IR admin )
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.
248.SH EXAMPLES
249.de BX
250.PP
251.nf
252.in +0.5i
253..
254.de EX
255.fi
256.PP
257..
258To get a file for editing,
259edit it,
260and produce a new delta:
261.BX
262sccs get \-e file.c
263ex file.c
264sccs delta file.c
265.EX
266To get a file from another directory:
267.BX
268sccs \-p/usr/src/sccs/s. get cc.c
269.EX
270or
271.BX
272sccs get /usr/src/sccs/s.cc.c
273.EX
274To make a delta of a large number of files
275in the current directory:
276.BX
277sccs delta *.c
278.EX
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
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>
293$(SRCS):
294 sccs get $(REL) $@
295.EX
296.SH "SEE ALSO"
297admin(SCCS),
298chghist(SCCS),
299comb(SCCS),
300delta(SCCS),
301get(SCCS),
302help(SCCS),
303prt(SCCS),
304rmdel(SCCS),
305sccsdiff(SCCS),
306what(SCCS)
307.br
308Eric Allman,
309.ul
310An Introduction to the Source Code Control System
311.SH BUGS
312It should be able to take directory arguments on pseudo-commands
313like the
314.SM SCCS
315commands do.
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
322comments & suggestions
323to csvax:eric.