📄 ch18_06.htm
字号:
<a name="IXT-18-123508" /><a name="IXT-18-123509" /><a name="IXT-18-123510" />Incorporate changes (add a delta) to one or more SCCS <em class="emphasis">files</em></tt>.<tt class="literal">delta</tt> stores changes made to a text fileretrieved by <tt class="literal">get -e</tt> and then edited.<tt class="literal">delta</tt> normallyremoves the text file.</p><h4 class="refsect2">Options</h4><dl><dt><tt class="literal">-d</tt></dt><dd>Use <tt class="literal">diff</tt> instead of <tt class="literal">bdiff</tt> to find the changes.Solaris only.</p></dd><dt><tt class="literal">-g</tt><tt><em class="replaceable">list</em></tt></dt><dd>Ignore deltas whose SCCS IDs (version numbers) arespecified in the comma-separated <em class="emphasis">list</em></tt>.Use – to supply a range; e.g., <tt class="literal">1.3,2.1-2.5</tt>.</p></dd><dt><tt class="literal">-m</tt>[<tt><em class="replaceable">list</em></tt>]</dt><dd>Supply a <em class="emphasis">list</em></tt> of modification request numbersas reasons for creating new deltas.<tt class="literal">-m</tt> is useful only when <tt class="literal">admin</tt>has set the <tt class="literal">v</tt> flag for <em class="emphasis">file</em>.If <tt class="literal">-m</tt> isomitted, the terminal displays <tt class="literal">MRs?</tt> as an input prompt.</p></dd><dt><tt class="literal">-n</tt></dt><dd>Do not remove the edited file (extracted by <tt class="literal">get -e</tt>)after execution of <tt class="literal">delta</tt>.</p></dd><dt><tt class="literal">-p</tt></dt><dd>Print a <tt class="literal">diff</tt>-style listing of delta changes to <em class="emphasis">file</em></tt>.</p></dd><dt><tt class="literal">-r</tt><tt><em class="replaceable">SID</em></tt></dt><dd>Delta version number that identifies <em class="emphasis">file</em></tt>. <tt class="literal">-r</tt> isneeded only when more than one version of an SCCS file is being edited simultaneously.</p></dd><dt><tt class="literal">-s</tt></dt><dd>Suppress printing of new SID and other delta information.</p></dd><dt><tt class="literal">-y</tt>[<tt><em class="replaceable">string</em></tt>]</dt><dd>Insert <em class="emphasis">string</em></tt> as a comment describing why the delta was made. If<tt class="literal">-y</tt> is omitted, the terminal displays <tt class="literal">comments?</tt> as an inputprompt.</p></dd></dl></td></tr><tr><td valign="top"><a name="get">get</a></td><td><p><tt class="literal">get</tt> [<tt><em class="replaceable"><tt>options</em></tt>] <tt><em class="replaceable">files</tt></em></tt></p><p><a name="IXT-18-123511" /><a name="IXT-18-123512" /><a name="IXT-18-123513" />Retrieve a text version of an SCCS <em class="emphasis">file</em></tt>.The retrieved text file (also called the g-file)has the same name as the SCCS file but drops the <tt class="literal">s.</tt> prefix. For each SCCS <em class="emphasis">file</em></tt>, <tt class="literal">get</tt> prints its version number and the number of lines retrieved. See the previous section, “Identification Keywords”, for alist of keywords that can be placed in text files. </p><h4 class="refsect2">Options</h4><dl><dt><tt class="literal">-a</tt><tt><em class="replaceable">n</em></tt></dt><dd>Retrieve delta sequence number <em class="emphasis">n</em></tt>; not very useful (used by<tt class="literal">comb</tt>).</p></dd><dt><tt class="literal">-b</tt></dt><dd>Create new branch (use with <tt class="literal">-e</tt>).</p></dd><dt><tt class="literal">-c</tt><tt><em class="replaceable">date</em></tt></dt><dd>Retrieve a version that includes only those changes made before<em class="emphasis">date</em>.<em class="emphasis">date</em> is a series of two-digit numbers indicating theyear, followed by an optional month, day, hour, minute, and second.Nonnumeric characters can be used as field separators;they are essentially ignored.</p></dd><dt><tt class="literal">-e</tt></dt><dd>Retrieve a text file for editing;this is the most commonly used option.Implies <tt class="literal">-k</tt>.</p></dd><dt><tt class="literal">-g</tt></dt><dd>Suppress the text and just retrieve the SCCS ID (version number),typically to check it.</p></dd><dt><tt class="literal">-G</tt><tt><em class="replaceable">name</em></tt></dt><dd>Save retrieved text in file <em class="emphasis">name</em></tt> (default is to dropthe <tt class="literal">s.</tt> prefix).Solaris only.</p></dd><dt><tt class="literal">-i</tt><tt><em class="replaceable">list</em></tt></dt><dd>Incorporate into the retrieved text fileany deltas whose SCCS IDs (version numbers) arespecified in the comma-separated <em class="emphasis">list</em>.Use a hyphen (–) to supply a range (e.g., <tt class="literal">1.3,2.1-2.5</tt>).</p></dd><dt><tt class="literal">-k</tt></dt><dd>Do not expand ID keywords to their values; use in place of <tt class="literal">-e</tt> to regenerate (overwrite) a text file that was ruined during editing.</p></dd><dt><tt class="literal">-l</tt>[<tt class="literal">p</tt>]</dt><dd>Create a delta summary (saved to a file or, with <tt class="literal">-lp</tt>, displayedon standard output).</p></dd><dt><tt class="literal">-m</tt></dt><dd>Precede each text line with the SCCS ID of the delta it relates to.</p></dd><dt><tt class="literal">-n</tt></dt><dd>Precede each text line with the <tt class="literal">%M%</tt> keyword (typically the name of the text file).</p></dd><dt><tt class="literal">-p</tt></dt><dd>Write retrieved text to standard output instead of to a file.</p></dd><dt><tt class="literal">-r</tt>[<tt><em class="replaceable">sid</em></tt>]</dt><dd>Retrieve SCCS ID (version number) <em class="emphasis">sid</em></tt>.With no <em class="emphasis">sid</em>, retrieve the latest version or theversion specified by the <tt class="literal">d</tt> flag in the SCCS file.</p></dd><dt><tt class="literal">-s</tt></dt><dd>Suppress normal output (show error messages only).</p></dd><dt><tt class="literal">-t</tt></dt><dd>Retrieve the top (most recent) version of a release.</p></dd><dt><tt class="literal">-w</tt><tt><em class="replaceable">string</em></tt></dt><dd>Replace the <tt class="literal">%W%</tt> keyword with <em class="emphasis">string</em></tt>;<tt class="literal">%W%</tt> is the header labelused by <tt class="literal">what</tt>.</p></dd><dt><tt class="literal">-x</tt><tt><em class="replaceable">list</em></tt></dt><dd>Exclude the <em class="emphasis">list</em></tt> of deltas from the retrieved text file;the inverse of <tt class="literal">-i</tt>. </p></dd></dl><h4 class="refsect2">Examples</h4><p>Retrieve file <tt class="literal">prog.c</tt> for editing; a subsequent <tt class="literal">delta</tt>creates a branch at version 1.3:</p><blockquote><pre class="code"><tt class="userinput"><b>get -e -b -r1.3 s.prog.c</b></tt></pre></blockquote><p>Retrieve file <tt class="literal">prog.c</tt>; contents will exclude changes made after2:30 p.m. on June 1, 1990 (except for deltas 2.6 and 2.7, which areincluded):</p><blockquote><pre class="code"><tt class="userinput"><b>get -c'90/06/01 14:30:00' -i'2.6,2.7' s.prog.c</b></tt></pre></blockquote><p>Display the contents of <tt class="literal">s.text.c</tt> (all revisions except 1.1 –1.7):</p><blockquote><pre class="code"><tt class="userinput"><b>get -p -x1.1-1.7 s.text.c</b></tt></pre></blockquote></td></tr><tr><td valign="top"><a name="help">help</a></td><td><p><tt class="literal">help</tt> [<em class="replaceable"><tt>commands</em> | <em class="replaceable">error_codes</tt></em>]</p><p><a name="IXT-18-123514" />Online help facility to explain SCCS commands or error messages.With no arguments, <tt class="literal">help</tt> prompts for a command name or anerror code. To display a brief syntax, supply the SCCS commandname. To display an explanationof an error message, supply the code that appears afteran SCCS error message. The <tt class="literal">help</tt> files usually reside in<tt class="literal">/usr/ccs/lib</tt>.</p><p>Error messages produced by aborted SCCS commands are of the form:</p><blockquote><pre class="code">ERROR <em class="replaceable"><tt>filename</em>: <em class="replaceable">message</em> (<em class="replaceable">code</tt></em>)</pre></blockquote><p>The <em class="emphasis">code</em> is useful for finding out the nature of your error.To do this, type:</p><blockquote><pre class="code"><tt class="userinput"><b>help </b></tt><em class="replaceable"><tt>code</tt></em></pre></blockquote><h4 class="refsect2">Example</h4><p>When everything else fails, try this:</p><blockquote><pre class="code"><tt class="userinput"><b>help stuck</b></tt></pre></blockquote></td></tr><tr><td valign="top"><a name="prs">prs</a></td><td><p><tt class="literal">prs</tt> [<em class="replaceable"><tt>options</em>] <em class="replaceable">files</tt></em></p><p><a name="IXT-18-123515" />Print formatted information for one or more SCCS <em class="emphasis">files</em>.</p><h4 class="refsect2">Options</h4><dl><dt><tt class="literal">-a</tt></dt><dd>Include information for all deltas, including removed ones.</p></dd><dt><tt class="literal">-c</tt><tt><em class="replaceable">date</em></tt></dt><dd>Cutoff <em class="emphasis">date</em></tt> used with <tt class="literal">-e</tt> or <tt class="literal">-l</tt>(see <b class="emphasis-bold">get</b> for format of <em class="emphasis">date</em>).</p></dd><dt><tt class="literal">-d</tt>[<tt><em class="replaceable">format</em></tt>]</dt><dd>Specify output <em class="emphasis">format</em></tt> by supplying textand/or SCCS keywords. See the previous section, “Data Keywords,” for a list of validkeywords.Use <tt class="literal">\t</tt> and <tt class="literal">\n</tt> in the <em class="emphasis">format</em></tt>to create a tab and newline, respectively.</p></dd><dt><tt class="literal">-e</tt></dt><dd>With <tt class="literal">-r</tt>, list data for deltas earlier than or including <em class="emphasis">sid</em></tt>;with <tt class="literal">-c</tt>, list data for deltas not newer than <em class="emphasis">date</em>.</p></dd><dt><tt class="literal">-l</tt></dt><dd>Like <tt class="literal">-e</tt>, but later than or including <em class="emphasis">sid</em></tt> or <em class="emphasis">date</em></tt>.</p></dd><dt><tt class="literal">-r</tt>[<tt><em class="replaceable">sid</em></tt>]</dt><dd>Specify SCCS ID <em class="emphasis">sid</em></tt>;default is the most recent delta.</p></dd></dl><h4 class="refsect2">Example</h4><p>The following command:</p><blockquote><pre class="code"><tt class="userinput"><b>prs -d"program :M: version :I: by :P:" -r s.yes.c</b></tt></pre></blockquote><p>might produce this output:</p><blockquote><pre class="code">program yes.c version 2.4.6 by daniel</pre></blockquote></td></tr><tr><td valign="top"><a name="prt">prt</a></td><td><p><tt class="literal">prt</tt> [<em class="replaceable"><tt>options</em>] <em class="replaceable">files</tt></em></p><p><a name="IXT-18-123516" />Solaris only.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -