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