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