| 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 |
| 41 | subsystem |
| 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 |
| 52 | is a front end to the |
| 53 | .Li SCCS |
| 54 | programs |
| 55 | that |
| 56 | helps them mesh more cleanly |
| 57 | with |
| 58 | the rest of UNIX. |
| 59 | It |
| 60 | also includes the capability to run |
| 61 | .Dq set user id |
| 62 | to another user |
| 63 | to |
| 64 | provide additional protection. |
| 65 | .Pp |
| 66 | Basically, |
| 67 | .Nm sccs |
| 68 | runs the command with the specified |
| 69 | .Ar flags |
| 70 | and |
| 71 | .Ar args . |
| 72 | Each argument is normally modified to be prepended with |
| 73 | .Dq Li SCCS/s. . |
| 74 | .Pp |
| 75 | Flags to be interpreted by the |
| 76 | .Nm sccs |
| 77 | program must be before the |
| 78 | .Ar command |
| 79 | argument. |
| 80 | Flags to be passed to the actual |
| 81 | .Li SCCS |
| 82 | program must come after the |
| 83 | .Ar command |
| 84 | argument. |
| 85 | These flags are specific to the command and |
| 86 | are discussed in the documentation for that command. |
| 87 | .Pp |
| 88 | Besides the usual |
| 89 | .Li SCCS |
| 90 | commands, |
| 91 | several |
| 92 | .Dq pseudo-commands |
| 93 | can be issued. |
| 94 | These are: |
| 95 | .Bl -tag -width deledit |
| 96 | .It Cm edit |
| 97 | Equivalent |
| 98 | to |
| 99 | .Dq Li get \-e . |
| 100 | .It Cm delget |
| 101 | Perform a delta on the named files and |
| 102 | then get new versions. |
| 103 | The new versions will have id keywords expanded, and |
| 104 | will not be editable. |
| 105 | The |
| 106 | .Fl m , |
| 107 | .Fl p , |
| 108 | .Fl r , |
| 109 | .Fl s , |
| 110 | and |
| 111 | .Fl y |
| 112 | flags will be passed to |
| 113 | .Nm delta , |
| 114 | and 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 |
| 123 | and |
| 124 | .Fl x |
| 125 | flags will be passed to get. |
| 126 | .It Cm deledit |
| 127 | Equivalent |
| 128 | to |
| 129 | .Nm delget |
| 130 | except that the |
| 131 | .Nm get |
| 132 | phase includes the |
| 133 | .Fl e |
| 134 | flag. |
| 135 | This |
| 136 | option is useful for making a |
| 137 | .Em checkpoint |
| 138 | of your current editing phase. The same flags will be passed to delta |
| 139 | as described above, and |
| 140 | all the flags listed for |
| 141 | .om get |
| 142 | above except |
| 143 | .Fl e |
| 144 | and |
| 145 | .Fl k |
| 146 | are |
| 147 | passed to |
| 148 | .Nm edit . |
| 149 | .It Cm create |
| 150 | Creates |
| 151 | an |
| 152 | .Li SCCS |
| 153 | file , |
| 154 | taking |
| 155 | the initial contents from the file of the same name. |
| 156 | Any |
| 157 | flags to |
| 158 | .Nm admin |
| 159 | are accepted. If the creation is successful, |
| 160 | the files are renamed with a comma on the front. |
| 161 | These should be removed when you are convinced that the |
| 162 | .Li SCCS |
| 163 | files |
| 164 | have been created successfully. |
| 165 | .It Cm fix |
| 166 | Must |
| 167 | be followed by a |
| 168 | .Fl r |
| 169 | flag. |
| 170 | This command essentially removes the named delta, but |
| 171 | leaves you with a copy of the delta |
| 172 | with the changes that were in it. It |
| 173 | is useful for fixing small compiler bugs, etc. |
| 174 | Since it doesn't leave audit trails, it should be used carefully. |
| 175 | .It Cm clean |
| 176 | This routine removes everything from the current directory |
| 177 | that can be recreated from SCCS files. |
| 178 | It will not remove any files being edited. |
| 179 | If the |
| 180 | .Fl b |
| 181 | flag is given, branches are ignored in the determination of |
| 182 | whether they are being edited; this |
| 183 | is dangerous if you are keeping the branches in the |
| 184 | same directory. |
| 185 | .It Cm unedit |
| 186 | This |
| 187 | is the opposite of an |
| 188 | .Nm edit |
| 189 | or |
| 190 | a |
| 191 | .Dq Li get \-e . |
| 192 | It should be used with extreme caution, since |
| 193 | any changes you made since the get will be irretrievably lost. |
| 194 | .It Cm info |
| 195 | Gives a listing of all files being edited. |
| 196 | If the |
| 197 | .Fl b |
| 198 | flag |
| 199 | is given, branches (i.e., |
| 200 | .Li SID Ns \&\'s |
| 201 | with two or fewer components) |
| 202 | are ignored. If the |
| 203 | .Fl u |
| 204 | flag is given (with an optional argument) then |
| 205 | only files being edited by you (or the named user) are listed. |
| 206 | .It Cm check |
| 207 | Like |
| 208 | .Nm info |
| 209 | except that nothing is printed if nothing is being edited, and |
| 210 | a non-zero exit status is returned if anything is being edited. |
| 211 | The intent is to have this included in an |
| 212 | .Em install |
| 213 | entry in a makefile to insure that everything is included into the |
| 214 | .Li SCCS |
| 215 | file before a version is installed. |
| 216 | .It Cm tell |
| 217 | Gives a newline-separated list of the files being edited |
| 218 | on the standard output. Takes the |
| 219 | .Fl b |
| 220 | and |
| 221 | .Fl u |
| 222 | flags like |
| 223 | .Nm info |
| 224 | and |
| 225 | .Nm check . |
| 226 | .It Cm diffs |
| 227 | Gives a |
| 228 | .Nm diff |
| 229 | listing between the current version of the |
| 230 | program(s) you have out for editing and the versions in |
| 231 | .Li SCCS |
| 232 | format. |
| 233 | The |
| 234 | .Fl r , |
| 235 | .Fl c , |
| 236 | .Fl i , |
| 237 | .Fl x , |
| 238 | and |
| 239 | .Fl t |
| 240 | flags are passed to |
| 241 | .if n \{\ |
| 242 | . br |
| 243 | .\} |
| 244 | .Nm get ; |
| 245 | the |
| 246 | .Fl l , |
| 247 | .Fl s , |
| 248 | .Fl e , |
| 249 | .Fl f , |
| 250 | .Fl h , |
| 251 | and |
| 252 | .Fl b |
| 253 | options are passed to |
| 254 | .if n \{\ |
| 255 | . br |
| 256 | .\} |
| 257 | .Nm diff . |
| 258 | The |
| 259 | .Fl C |
| 260 | flag is passed to |
| 261 | .Nm diff |
| 262 | as |
| 263 | .Fl c . |
| 264 | .It Cm print |
| 265 | This command prints out verbose information |
| 266 | about the named files. |
| 267 | .Pp |
| 268 | .It Fl r |
| 269 | Runs |
| 270 | .Nm sccs |
| 271 | as the real user rather than as whatever effective user |
| 272 | .Nm sccs |
| 273 | is |
| 274 | .Dq Li set user id |
| 275 | to. |
| 276 | .It Fl d |
| 277 | Specifies a root directory for the |
| 278 | .Li SCCS |
| 279 | files. |
| 280 | The default is the current directory. |
| 281 | If environment variable |
| 282 | .Ev PROJECT |
| 283 | is set, |
| 284 | it will be used to determine the |
| 285 | .Fl d |
| 286 | flag. |
| 287 | .It Fl p |
| 288 | Defines the pathname of the directory in which the |
| 289 | .Li SCCS |
| 290 | files will be found; |
| 291 | .Dq Li SCCS |
| 292 | is the default. |
| 293 | The |
| 294 | .Fl p |
| 295 | flag |
| 296 | differs from the |
| 297 | .Fl d |
| 298 | flag |
| 299 | in that the |
| 300 | .Fl d |
| 301 | argument is prepended to the entire pathname and the |
| 302 | .Fl p |
| 303 | argument is inserted before the final component of the pathname. |
| 304 | For example, |
| 305 | .Dq Li sccs \-d/x \-py get a/b |
| 306 | will convert to |
| 307 | .Dq Li get /x/a/y/s.b . |
| 308 | The intent here is to create aliases such as |
| 309 | .Dq Li alias syssccs sccs -d/usr/src |
| 310 | which |
| 311 | will be used as |
| 312 | .Dq Li syssccs get cmd/who.c . |
| 313 | .Pp |
| 314 | Certain |
| 315 | commands (such as |
| 316 | .Nm admin ) |
| 317 | cannot be run |
| 318 | .Dq Li set user id |
| 319 | by all users, since this would allow anyone to change the authorizations. |
| 320 | These commands are always run as the real user. |
| 321 | .Sh EXAMPLES |
| 322 | To get a file for editing, |
| 323 | edit it, |
| 324 | and 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 |
| 330 | To get a file from another directory: |
| 331 | .Pp |
| 332 | .Dl sccs \-p/usr/src/sccs/s. get cc.c |
| 333 | .Pp |
| 334 | or |
| 335 | .Pp |
| 336 | .Dl sccs get /usr/src/sccs/s.cc.c |
| 337 | .Pp |
| 338 | To make a delta of a large number of files |
| 339 | in the current directory: |
| 340 | .Pp |
| 341 | .Dl sccs delta *.c |
| 342 | .Pp |
| 343 | To get a list of files being edited that are not on branches: |
| 344 | .Pp |
| 345 | .Dl sccs info \-b |
| 346 | .Pp |
| 347 | To delta everything being edited by you: |
| 348 | .Pp |
| 349 | .Dl sccs delta \`sccs tell \-u\` |
| 350 | .Pp |
| 351 | In a makefile, to get source files |
| 352 | from an |
| 353 | .Li SCCS |
| 354 | file 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 |
| 362 | The PROJECT environment variable is checked by the |
| 363 | .Fl d |
| 364 | flag. If |
| 365 | it begins with a slash, it is taken directly; otherwise, |
| 366 | the home directory of a user of that name is |
| 367 | examined for a subdirectory |
| 368 | .Dq Li src |
| 369 | or |
| 370 | .Dq Li source . |
| 371 | If 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 |
| 389 | The |
| 390 | .Nm sccs |
| 391 | command |
| 392 | appeared in |
| 393 | .Bx 4.3 . |
| 394 | .Sh BUGS |
| 395 | It should be able to take directory arguments on pseudo-commands |
| 396 | like the |
| 397 | .Li SCCS |
| 398 | commands do. |