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