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