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