📄 sccs.1
字号:
.\" SCCSID: @(#)sccs.1 8.1 9/11/90.TH sccs 1.SH Namesccs \- Source Code Control System .SH Syntax\fBsccs [\fIflags\fR] \fIcommand\fR [\|\fIcommand-option\fR\|] [\|\fIfile\fR\|] [\|sccs\|].SH Description.NXA "sccs preprocessor" "get command (sccs)".NXA "sccs preprocessor" "SCCS file".NXS "source code control system preprocessor" "sccs preprocessor".NXR "sccs preprocessor".NXR "SCCS file" "recording changes".NXA "file" "\fIspecific files\fPSCCS is a source management system whichmaintains records of changes made in fileswithin that system. Records stating what thechanges were, why and when they were made, and who made them are kept for each version.Previous versions can be recovered,and different versions can be maintainedsimultaneously. SCCS also insures that two people are not editingthe same file at the same time..PPThe SCCSsystem has two levels of operation,a preprocessor called .PN sccs and the traditional SCCS commands. The preprocessor .MS sccs 1provides an interface with themore traditional SCCS commands, such as.B get, delta,and so forth. The .MS sccs 1interface is a more user-friendly environmentfor the SCCSuser. Some of the commands are more intuitive, such as .B sccs editrather than the traditional.B get \-eto retrieve a file for editing. Some commands perform multiple operations, such as .B sccs delgetwhich performs a .B deltaon the file, and then.B getthe changed file back..PPThe .MS sccs 1preprocessoralso restructures the method in which SCCSfiles are stored and manipulated. In the traditionalversion of SCCS,files (s-files, p-files, and so forth) are stored in thedirectory that contains the g-files, unless an SCCSdirectory is explicitly defined with each command. The .MS sccs 1preprocessor expects that an SCCS directory is available within the directory that contains the g-filesand that this directory also contains the SCCS files. The SCCSdirectory is owned by .PN sccs, providing anadditional level of security. This method alsocleans up the directory where the g-files arestored. One other important difference in using thepreprocessor is that the file specification is the name of theg-file rather than the name of the s-file when invoking anSCCS command. If SCCSis specified rather than the file name, the SCCS preprocessor handles this in the samemanner as the traditional commands handle it. Eachs-file in the directory SCCS is acted upon as if explicitly named. Pleasenote that not all .MS sccs 1preprocessor commands permit this feature..PPThe traditional SCCScommands are also included for reference in SEE ALSO.If the .MS sccs 1preprocessor is used, small discrepancies mayexist due to conflicts between the command parametersand the .MS sccs 1preprocessor parameters. .PPSCCS stores all versions of each file along with thelogged data about each version in the s-file.Three major operations can be performed on the s-file..PPTo retrieve a file for reading or printing use the following command:.EXsccs get [filename][sccs].EEThe latest version is retrieved and is NOT intended for edit. .PPTo retrieve a file for edit use the following command:.EXsccs edit [filename][sccs].EEThe latest version is retrieved and only one person can edit a given file at one time..PP To merge a file back into the s-file use the following command:.EXsccs delta [filename][sccs].EEThis is a companion operation to the edit command (Step 2).A new version number is assigned. Comments explainingthe changes are saved. .PP A .B deltaconsists of the changes made to a file, not the file itself. .NXR "delta" "defined"All deltas to a given file are stored, enabling you to get a version of the file that has selecteddeltas removed which gives you the option of removingyour selected changes later. .PPAn SID is an identification number for a delta. .NXR "SID" "defined"It consists oftwo parts, a release number and a level number. The release numbernormally remains constant but can be changed when major changesin the file are made. The level numbers represent each delta for a given file. A SID can also be used to represent a version number of the entire file..PPTo create all the source files in a given directory in SCCS format, run the following shell script from csh:.EXmkdir SCCS savechown sccs SCCSforeach i (*.[.ch]) sccs admin \-i$i $i mv $i save/$iend.EENote that to run the .PN chowncommand, you must be the superuser.However,the \fIGuide to the Source Code Control System\fPdescribes a method for setting up SCCS files that makessuperuser privileges unnecessary..PPTo create a single source file in SCCS format, assuming the presence of the SCCS directory, use the following command:.NXR(e) "file" "converting to sccs format".EXsccs create <filename>.EEBecause the number and types of commands used within SCCS are many and complex, the following quick reference table is included here.See the \fIGuide to the Source Code Control System\fPfor further explanations of commands..SH Flags.IP \-d<dir> 15The <dir> represents a directory to searchout of. It should be a full pathnamefor general usage. For example, if <dir> is.PN /usr/src/sys ,then a reference to thefile .PN dev/bio.cbecomes a reference to.PN /usr/src/sys/dev/bio.c ..IP \-p<path>Prepends <path> to the final componentof the pathname. By default, this isSCCS. For example, in the .B \-dexample above, the path then gets modified to.PN /usr/src/sys/dev/SCCS/s.bio.c .In more common usage (without the \-d flag),.PN prog.cwould get modified to.PN SCCS/s.prog.c .In both cases, the.PN s .gets automatically prepended..IP \-rRun as the real user..SH Commands .NXR "sccs preprocessor" "command list"These commands should all be preceded by .PN sccs ..IP get 15.NXR "get command (sccs)"Gets files for compilation (not for editing).Id keywords are expanded..RS.IP \-e 10Gets a writable copy of the file..IP \-r\fISID\fRGet specified version..IP \-pSend to standard output rather than to the actual file..IP \-kGets a writable copy of the file. Does not expand id keywords..IP \-i\fIlist\fRInclude list of deltas. .IP \-x\fIlist\fRExclude list of deltas. .IP \-mPrecede each line with SID of delta being created..IP \-c\fIdate\fRDo not apply any deltas created after.I date..RE.IP edit 15.NXR "edit command (sccs)"Gets files for editing.Id keywords are not expanded.Should be matched with a.B deltacommand after editing..RS.IP \-r\fISID\fR 10 Get specified version. If SID specifies a release that does not yet exist,the highest numbered delta is retrievedand the new delta is numbered with SID .IP \-bCreate a branch..IP \-i\fIlist\fRInclude list of deltas.IP \-x\fIlist\fRExclude list of deltas.RE.IP delta 15.NXR "delta command (sccs)"Merge a file retrieved using.B editback into the s-file.Collect comments about why this delta was made..IP unedit .NXR "unedit command (sccs)"Remove a file that has been edited previouslywithout merging the changes into the s-file..IP info .NXR "info command (sccs)"Display a list of all files being edited..RS.IP \-b 10 Ignore branches..IP \-u[\fIuser\fP]Ignore files not being edited by.I user ..RE.IP check 15.NXR "check command (sccs)"Same as.I info,except that nothing is printed if nothing is being editedand exit status is returned..IP prsProduces a report of changes to the named file. Time, date,user, number of lines changed, the revision number, and commentsare listed for each delta..IP create .NXR "create command (sccs)"Create an s. file and do not remove the associated g-file..IP tell .NXR "tell command (sccs)"Same as.I info,except that only the file name of files being edited is listed. .IP clean .NXR "clean command (sccs)"Remove all files that can be regenerated from thes-file..IP what .NXR "what command (sccs)"Find and print id keywords..IP admin .NXR "admin command (sccs)"Create or set parameters on s-files..RS.IP \-i\fIfile\fR 10 Create, using.I fileas the initial contents..IP \-zRebuild the checksum in casethe file has been corrupted..IP \-f\fIflag\fRTurn on the.I flag..IP \-d\fIflag\fRTurn off (delete) the.I flag ..IP \-t\fIfile\fRReplace the textin the s-file with the contents of.I file.If.I fileis omitted,the text is deleted.Useful for storing documentationor design and implementationdocuments to insure distribution with thes-file..PPUseful flags are:.IP b 10Allow branches to be made using the \-b flag to.I edit..IP d\fISID\fRDefault SID to be usedon a.B getor.B edit..IP iCause.I No Id Keywordserror messageto be a fatal error rather than a warning..IP tThe moduletype; the value of this flag replaces the.B %\&Y\&%keyword..RE.IP fix 15.NXR "fix command (sccs)"Remove a delta and reedit it..IP delget .NXR "delget command (sccs)"Do a.B deltafollowed by a.B get..IP deledit .NXR "deledit command (sccs)"Do a.B deltafollowed by an.B edit..IP diffs.NXR "diffs command (sccs)"Compare the g-file out for edit with an earlier SCCS version..IP sccsdiff.NXR "sccsdiff command (sccs)"Compare any two SCCS versions of a g-file..IP help.NXR "sccshelp command"Given either a command name, oran sccs message number, this command provides additional information..SH Id Keywords.NXR "sccs preprocessor" "keywords".IP %\&Z\&% 15Expands to@\&(#)for the.I whatcommand to find..IP %\&M\&%The current module name,for example,prog.c..IP %\&I\&%The highest SID applied..IP %\&W\&%A shorthand for``%\&Z\&%%\&M\&% <tab> %\&I\&%''..IP %\&G\&%.The date of the deltacorresponding to the%\&I\&%.keyword..IP %\&R\&%.The current release number,for example,the first component of the%\&I\&%keyword..IP %\&Y\&%Replaced by the value of the.B tflag(set by.B admin)..SH See Alsoadmin(1), cdc(1), comb(1), delta(1), get(1), prs(1), rmdel(1), sccshelp(1), unget(1), val(1), what(1), sccsfile(5).br\fIGuide to the Source Code Control System\fP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -