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