⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unx30.htm

📁 Unix Unleashed, Third Edition is written with the power user and system administrator in mind. This
💻 HTM
📖 第 1 页 / 共 5 页
字号:
will usually do what is desired. See the get man page entry for more details. You can specify a cutoff date (get the last delta before the cutoff) with -cYY[MM[DD[HH[MM[SS]]]]].

<BR></P>

<P>You can use the get command to set a lock, by doing a get for edit, or get -e, which locks the SCCS file and disables keyword expansion.

<BR></P>

<H5 ALIGN="CENTER">

<CENTER><A ID="I32" NAME="I32">

<FONT SIZE=3><B>Checking In a File</B>

<BR></FONT></A></CENTER></H5>

<P>SCCS uses the delta command to submit changed revisions, which is also called creating a delta.

<BR></P>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="imp.gif" WIDTH = 68 HEIGHT = 35><B>TIP: </B>If you have a lengthy log message that is common to more than one file, enter the text of the message into a file. Then on the check in command line, use  -y'cat <I>filename</I>' to specify that the 
contents of the file <I>filename</I> should be used as the log message.

<BR></NOTE>

<HR ALIGN=CENTER>

<H5 ALIGN="CENTER">

<CENTER><A ID="I33" NAME="I33">

<FONT SIZE=3><B>Examining Revision Details and History</B>

<BR></FONT></A></CENTER></H5>

<P>The prs command enables you to print reports on the SCCS file. It has somewhat more flexibility than the rlog command in RCS. It enables you to supply a format specification using the -d option that will control the printing of information about the 
SCCS file. This can be used to created customized reports. prs shows you other details besides just the log messages.

<BR></P>

<H5 ALIGN="CENTER">

<CENTER><A ID="I34" NAME="I34">

<FONT SIZE=3><B>Keywords</B>

<BR></FONT></A></CENTER></H5>

<P>SCCS has a keyword substitution method that's different from that of RCS. SCCS keywords are of the form <I>%x%</I> and are expanded when you do a get with the -k (or -e) option. See the get man page entry for a full list of keywords. Expanded keyboards 

have advantages and disadvantages. Expanded keywords need no processing to be easily human readable (for example, printf(&quot;Revision %I%\n&quot;); in C code will print out as Revision 1.1 for revision 1.1 checked out with the keywords expanded). 
Expanded keywords are difficult to recover. If someone sends you a modified version of one of your sources, you will need to find all of the expanded keywords and replace them with the actual keyword (for example, replace printf(&quot;Revision 
1.1\n&quot;); with printf(&quot;Revision %I%\n&quot;); in C code); this can be very difficult if you don't localize keyword usage.

<BR></P>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="imp.gif" WIDTH = 68 HEIGHT = 35><B>TIP: </B>You can embed SCCS keywords that identify your program executable by using this:

<BR>

<BR>char sccsid[] = &quot;%W%&quot;;

<BR>

<BR>To take advantage of this, make sure you perform your build with no files out for editing (remember that when you perform get -e the keyword is not expanded). If you do this, you will be able to use the what command to identify what revision(s) of what 

file(s) went into creating the executable.

<BR>

<BR>You can also use the %I% keyword to identify your revision(s) for printing version messages.

<BR></NOTE>

<HR ALIGN=CENTER>

<H4 ALIGN="CENTER">

<CENTER><A ID="I35" NAME="I35">

<FONT SIZE=3><B>Locks&#151;Mediating Conflict</B>

<BR></FONT></A></CENTER></H4>

<P>SCCS locks are strict in that they will not allow a delta without a get -e. You can use the admin -fj command to allow concurrent get -e commands on the same revision.

<BR></P>

<H4 ALIGN="CENTER">

<CENTER><A ID="I36" NAME="I36">

<FONT SIZE=3><B>Branches&#151;Complicating the Tree</B>

<BR></FONT></A></CENTER></H4>

<P>SCCS supports branches as described in the section &quot;Basic Source Control Concepts.&quot; Using get -b -e will cause SCCS to create a branch from the specified revision. SCCS does not support branches on branches the way RCS does.

<BR></P>

<H4 ALIGN="CENTER">

<CENTER><A ID="I37" NAME="I37">

<FONT SIZE=3><B>Merges&#151;Controlling Parallel Changes</B>

<BR></FONT></A></CENTER></H4>

<P>SCCS has no built-in support for performing merges. You can use the merge program as described in &quot;Basic Source Control Concepts&quot; to merge revisions of SCCS files if your version of UNIX has it.

<BR></P>

<H4 ALIGN="CENTER">

<CENTER><A ID="I38" NAME="I38">

<FONT SIZE=3><B>Extra SCCS Features</B>

<BR></FONT></A></CENTER></H4>

<P>SCCS includes extra software configuration management support hooks that are not in RCS. The admin -f<I> x</I> and admin -d<I> x</I> commands can be used to do the following:

<BR></P>

<TABLE BORDER>

<TR>

<TD>

<P>

<BR>x

<BR></P>

<TD>

<P>

<BR>Action

<BR></P>

<TR>

<TD>

<P>

<BR>v[<I>pgm</I>]

<BR></P>

<TD>

<P>

<BR>Require modification request numbers for delta.

<BR></P>

<TR>

<TD>

<P>

<BR>c<I>ceil</I>

<BR></P>

<TD>

<P>

<BR>Limit the releases that can be retrieved using get.

<BR></P>

<TR>

<TD>

<P>

<BR>ffloor

<BR></P>

<TD>

<P>

<BR>Limit the releases that can be retrieved using get.

<BR></P>

<TR>

<TD>

<P>

<BR>l<I>list</I>

<BR></P>

<TD>

<P>

<BR>Limit the releases that can be submitted using delta.

<BR></P>

<TR>

<TD>

<P>

<BR>j

<BR></P>

<TD>

<P>

<BR>Enable/disable concurrent locks.

<BR></P>

<TR>

<TD>

<P>

<BR>b

<BR></P>

<TD>

<P>

<BR>Enable/disable branching.

<BR></P>

<TR>

<TD>

<P>

<BR>d<I>SID</I>

<BR></P>

<TD>

<P>

<BR>Set default revision for get.

<BR></P>

<TR>

<TD>

<P>

<BR>n

<BR></P>

<TD>

<P>

<BR>Create null deltas for skipped releases. This can be used to create a base revision for branches in releases that had no source modifications.

<BR></P>

<TR>

<TD>

<P>

<BR>[qtm]

<BR></P>

<TD>

<P>

<BR>Control expansion of some keywords.</P></TABLE>

<P>See the admin man page entry for more details on these options.

<BR></P>

<H3 ALIGN="CENTER">

<CENTER><A ID="I39" NAME="I39">

<FONT SIZE=4><B>Using Source Control for Backups</B>

<BR></FONT></A></CENTER></H3>

<P>Both RCS and SCCS can also be used as a simple personal backup system. To do this, you periodically check in copies of the files that are to be backed up. This will give you a revision history of the files, and you can use this history to recover from 
errors you may make (for example, accidentally removing a file or deleting some text you meant to keep).

<BR></P>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="caution.gif" WIDTH = 37 HEIGHT = 35><B>CAUTION: </B>Because it is likely that your source control files will be on the same disk (and same computer) as the original files, using source control systems to perform backup is not a perfect solution. 

If catastrophic damages occur on the computer or disk on which the source control files are stored, both the original file and the backup source control files may be destroyed. Despite this, backup using source control can be useful.

<BR></NOTE>

<HR ALIGN=CENTER>

<P>Do not use source control as your only backup system. Use it to enhance an existing system. For example, if your system is backed up weekly, but you would like to pr

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -