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

📄 ch19_05.htm

📁 unix基础教程
💻 HTM
📖 第 1 页 / 共 3 页
字号:
</dl><h4 class="refsect2">Example</h4><p>Remove unchanged copies of program and header files:</p><blockquote><pre class="code"><tt class="userinput"><b>rcsclean *.c *.h</b></tt></pre></blockquote></td></tr><tr><td valign="top"><a name="rcsdiff">rcsdiff</a></td><td><p><tt class="literal">rcsdiff</tt> [<tt><em class="replaceable"><tt>options</em></tt>] [<tt><em class="replaceable">diff_options</em></tt>] <tt><em class="replaceable">files</tt></em></tt></p><p><a name="IXT-19-123597" />Compare revisions via <tt class="literal">diff</tt>.Specify revisions using <tt class="literal">-r</tt> as follows:</p><table border="1" cellpadding="3"><tr><th><em class="emphasis"># of Revisions</em></tt></th><th><em class="emphasis">Comparison Made</em></tt></th></tr><tr><td>None</td><td>Working file against latest revision.</td></tr><tr><td>One</td><td>Working file against specified revision.</td></tr><tr><td>Two</td><td>One revision against the other.</td></tr></table><p><p><tt class="literal">rcsdiff</tt> accepts the standard options<tt class="literal">-q</tt>,<tt class="literal">-V</tt>,<tt class="literal">-V</tt><em class="emphasis">n</em></tt>,<tt class="literal">-T</tt>,<tt class="literal">-x</tt>,and<tt class="literal">-z</tt>,as well as<em class="emphasis">diff_options</em></tt>, which can be any valid <tt class="literal">diff</tt> option.<tt class="literal">rcsdiff</tt> exits with a status of 0 (no differences), 1 (some differences),or 2 (unknown problem).The <tt class="literal">-c</tt> option to <tt class="literal">diff</tt> canbe very useful with <tt class="literal">rcsdiff</tt>.</p><p><tt class="literal">rcsdiff</tt> prints &#8220;retrieving revision ...&#8221;messages to standard error, as well as a line of equals signs for separatingmultiple files.It is often useful to redirect standard error and standard output to thesame file.</p><h4 class="refsect2">Options</h4><dl><dt><tt class="literal">-k</tt><tt><em class="replaceable">c</em></tt></dt><dd>When comparing revisions, expand keywords using style <em class="emphasis">c</em></tt>.(See <b class="emphasis-bold">co</b> for values of <em class="emphasis">c</em>.)</p></dd><dt><tt class="literal">-r</tt><tt><em class="replaceable">R1</em></tt></dt><dd>Use revision <em class="emphasis">R1</em></tt> in the comparison.</p></dd><dt><tt class="literal">-r</tt><tt><em class="replaceable">R2</em></tt></dt><dd>Use revision <em class="emphasis">R2</em></tt> in the comparison.(<tt class="literal">-r</tt><em class="replaceable"><tt>R1</tt></em> must also be specified.)</p></dd></dl><h4 class="refsect2">Examples</h4><p>Compare the current working file against the last checked-in version:</p><blockquote><pre class="code"><tt class="userinput"><b>rcsdiff -c ch19.sgm 2&gt;&amp;1 | more</b></tt></pre></blockquote><p>Compare the current working file against the very first version:</p><blockquote><pre class="code"><tt class="userinput"><b>rcsdiff -c -r1.1 ch19.sgm 2&gt;&amp;1 | more</b></tt></pre></blockquote><p>Compare two earlier versions of a file against each other:</p><blockquote><pre class="code"><tt class="userinput"><b>rcsdiff -c -r1.3 -r1.4 ch19.sgm 2&gt;&amp;1 | more</b></tt></pre></blockquote></td></tr><tr><td valign="top"><a name="rcsfreeze">rcsfreeze</a></td><td><p><tt class="literal">rcsfreeze</tt> [<em class="replaceable"><tt>name</tt></em>]</p><p><a name="IXT-19-123598" />Although included with RCS, this shell script is optional andmight not be installed on your system.<tt class="literal">rcsfreeze</tt> assigns a name to an entire set of RCS files,which must already be checked in.  This is useful for markinga group of files as a single configuration.The default <em class="emphasis">name</em> is <tt class="literal">C_</tt><em class="emphasis">n</em>,where <em class="emphasis">n</em> is incrementedeach time you run <tt class="literal">rcsfreeze</tt>.</p></td></tr><tr><td valign="top"><a name="rcsmerge">rcsmerge</a></td><td><p><tt class="literal">rcsmerge</tt> [<em class="replaceable"><tt>options</em>] [<em class="replaceable">diff3 options</em>] <em class="replaceable">file</tt></em></p><p><a name="IXT-19-123599" />Perform a three-way merge of file revisions,taking two differing versions and incorporating the changesinto the working <em class="emphasis">file</em>.  You must provide either one or two revisions to merge(typically with <tt class="literal">-r</tt>).Overlaps are handled the same as with <tt class="literal">merge</tt>,by placing warnings in the resulting file.<tt class="literal">rcsmerge</tt> accepts the standard options<tt class="literal">-q</tt>,<tt class="literal">-V</tt>,<tt class="literal">-V</tt><em class="emphasis">n</em>,<tt class="literal">-T</tt>,<tt class="literal">-x</tt>,and<tt class="literal">-z</tt>.<tt class="literal">rcsmerge</tt> exits with a status of 0 (no overlaps), 1 (some overlaps),or 2 (unknown problem).</p><p><tt class="literal">rcsmerge</tt> accepts the <tt class="literal">-A</tt>,<tt class="literal">-e</tt>, and <tt class="literal">-E</tt> options for<tt class="literal">diff3</tt> and simply passes them on, causing <tt class="literal">diff3</tt>to perform the corresponding kind of merge.See <b class="emphasis-bold">merge</b>, and also seethe entry for <b class="emphasis-bold">diff3</b> in <a href="ch02_01.htm">Chapter 2</a>for details. (The <tt class="literal">-A</tt> option is for the GNU version of <tt class="literal">diff3</tt>.)</p><h4 class="refsect2">Options</h4><dl><dt><tt class="literal">-k</tt><tt><em class="replaceable">c</em></tt> </dt><dd>When comparing revisions, expand keywords using style <em class="emphasis">c</em></tt>.(See <b class="emphasis-bold">co</b> for values of <em class="emphasis">c</em></tt>.)</p></dd><dt><tt class="literal">-p</tt>[<tt><em class="replaceable">R</em></tt>]</dt><dd>Send merged version to standard output instead of overwriting <em class="emphasis">file</em></tt>.</p></dd><dt><tt class="literal">-r</tt>[<tt><em class="replaceable">R</em></tt>]</dt><dd>Merge revision <em class="emphasis">R</em></tt> or, if no <em class="emphasis">R</em></tt> is given, merge the latest revision.</p></dd></dl><h4 class="refsect2">Examples</h4><p>Suppose you need to add updates to an old revision (1.3) of <tt class="literal">prog.c</tt>,but the current file is already at revision 1.6.  To incorporate thechanges:</p><blockquote><pre class="code"><tt class="userinput"><b>co -l prog.c         </b></tt> <i class="lineannotation">Get latest revision(Edit latest revision by adding updates for revision 1.3, then:)</i><tt class="userinput"><b>rcsmerge -p -r1.3 -r1.6 prog.c &gt; prog.updated.c</b></tt></pre></blockquote><p>Undo changes between revisions 3.5 and 3.2, and overwrite theworking file:</p><blockquote><pre class="code"><tt class="userinput"><b>rcsmerge -r3.5 -r3.2 chap08</b></tt></pre></blockquote></td></tr><tr><td valign="top"><a name="rlog">rlog</a></td><td><p><tt class="literal">rlog</tt> [<tt><em class="replaceable"><tt>options</em></tt>] <tt><em class="replaceable">files</tt></em></tt></p><p><a name="IXT-19-123600" />Display identification information for RCS <em class="emphasis">files</em></tt>,including the log message associated with each revision,the number of lines added or removed, date of last check-in,etc.  With no options, <tt class="literal">rlog</tt> displays all information.Use options to display specific items.<tt class="literal">rlog</tt> accepts the standard options<tt class="literal">-q</tt>,<tt class="literal">-V</tt>,<tt class="literal">-V</tt><em class="emphasis">n</em></tt>,<tt class="literal">-T</tt>,<tt class="literal">-x</tt>,and<tt class="literal">-z</tt>.</p><h4 class="refsect2">Options</h4><dl><dt><tt class="literal">-b</tt></dt><dd>Prune the display; print only about the default branch.</p></dd><dt><tt class="literal">-d</tt><tt><em class="replaceable">dates</em></tt></dt><dd>Display information for revisions whose check-in timestamp falls inthe range of <em class="emphasis">dates</em></tt> (a list separated by semicolons).Be sure to use quotes.  Each date can be specified as:</p><dl><dt><i><tt><em class="replaceable"><tt>d1</em></tt>&#160;<tt class="literal">&lt;</tt>&#160;<tt><em class="replaceable">d2</em></tt></i></dt><dd>Select revisions between date <em class="emphasis">d1</em></tt> and <em class="emphasis">d2</tt></em></tt>, inclusive.</p></dd><dt><i><tt><em class="replaceable"><tt>d1</em></tt> <tt class="literal">&lt;</tt></i></dt><dd>Select revisions made on or after <em class="emphasis">date1</tt></em></tt>.</p></dd><dt><i><tt><em class="replaceable"><tt>d1</em></tt> <tt class="literal">&gt;</tt></i></dt><dd>Select revisions made on or before <em class="emphasis">date1</tt></em></tt>.</p></dd></dl><p>Timestamp comparisons are strict.If two files have exactly the same time, <tt class="literal">&lt;</tt> and <tt class="literal">&gt;</tt>won't work.Use <tt class="literal">&lt;=</tt> and <tt class="literal">&gt;=</tt> instead.</p></dd><dt><tt class="literal">-h</tt></dt><dd>Display the beginning of the normal <tt class="literal">rlog</tt> listing.</p></dd><dt><tt class="literal">-l</tt>[<tt><em class="replaceable">users</em></tt>]</dt><dd>Display information only about locked revisions or, if <em class="emphasis">users</em> is specified, only about revisions lockedby the list of <em class="emphasis">users</em>.</p></dd><dt><tt class="literal">-L</tt></dt><dd>Skip files that aren't locked.</p></dd><dt><tt class="literal">-N</tt></dt><dd>Don't print symbolic names.</p></dd><dt><tt class="literal">-r</tt>[<tt><em class="replaceable">list</em></tt>]</dt><dd>Display information for revisions in the comma-separated<em class="emphasis">list</em></tt> of revision numbers.  If no <em class="emphasis">list</em></tt> is given,the latest revision is used.  Items canbe specified as:</p><p>The <tt class="literal">&#8211;</tt> range separator character fromRCS versions prior to 5.6 is still valid.</p></dd></dl><table border="1" cellpadding="3"><tr><td><em class="emphasis">R1</em></tt></td><td><p>Select revision <em class="emphasis">R1</em></tt>.If <em class="emphasis">R1</em></tt> is a branch, select all revisions on it.</p></td></tr><tr><td><em class="emphasis">R1</em></tt><tt class="literal">.</tt></td><td><p>If <em class="emphasis">R1</em></tt> is a branch, select its latest revision.</p></td></tr><tr><td><em class="emphasis">R1</em></tt><tt class="literal">:</tt><em class="emphasis">R2</em></tt></td><td><p>Select revisions <em class="emphasis">R1</em></tt> through <em class="emphasis">R2</em></tt>.</p></td></tr><tr><td><tt class="literal">:</tt><em class="emphasis">R1</em></tt></td><td><p>Select revisions from beginning of branch through <em class="emphasis">R1</em></tt>.</p></td></tr><tr><td><em class="emphasis">R1</em></tt><tt class="literal">:</tt></td><td><p>Select revisions from <em class="emphasis">R1</em></tt> through end of branch.</p></td></tr></table><p><dl><dt><tt class="literal">-R</tt></dt><dd>Display only the name of the RCS file.</p></dd><dt><tt class="literal">-s</tt><tt><em class="replaceable">states</em></tt></dt><dd>Display information for revisions whose state matches one from thecomma-separated list of <em class="emphasis">states</em></tt>.</p></dd><dt><tt class="literal">-t</tt></dt><dd>Same as <tt class="literal">-h</tt>, but also display the file's description.</p></dd><dt><tt class="literal">-w</tt>[<tt><em class="replaceable">users</em></tt>]</dt><dd>Display information for revisions checked in by anyone in the comma-separatedlist of <em class="emphasis">users</em></tt>.If no <em class="emphasis">users</em></tt> are supplied, assume the name of the invoking user.</p></dd></dl><h4 class="refsect2">Examples</h4><p>Display the revision histories of all your RCS files:</p><blockquote><pre class="code"><tt class="userinput"><b>rlog RCS/*,v | more</b></tt></pre></blockquote><p>Display names of RCS files that are locked by user <tt class="literal">daniel</tt>.</p><blockquote><pre class="code"><tt class="userinput"><b>rlog -R -L -ldaniel RCS/*</b></tt></pre></blockquote><p>Display the &#8220;title&#8221; portion (no revision history) of a working file:</p><blockquote><pre class="code"><tt class="userinput"><b>rlog -t calc.c</b></tt></pre></blockquote></td></tr></table><p><a name="IXT-19-123601" /><a name="IXT-19-123602" /><a name="IXT-19-123603" /><a name="IXT-19-123604" /><hr width="684" align="left" /><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="ch19_04.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td align="center" valign="top" width="228"><a href="index.htm"><img src="../gifs/txthome.gif" alt="Home" border="0" /></a></td><td align="right" valign="top" width="228"><a href="ch20_01.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr><tr><td align="left" valign="top" width="228">19.4. Conversion Guide for SCCS Users</td><td align="center" valign="top" width="228"><a href="index/index.htm"><img src="../gifs/index.gif" alt="Book Index" border="0" /></a></td><td align="right" valign="top" width="228">20. The make Utility</td></tr></table></div><hr width="684" align="left" /><img src="../gifs/navbar.gif" usemap="#library-map" border="0" alt="Library Navigation Links" /><p><p><font size="-1"><a href="copyrght.htm">Copyright &copy; 2003</a> O'Reilly &amp; Associates. All rights reserved.</font></p><map name="library-map"><area shape="rect" coords="1,0,88,96" href="../index.htm"><area shape="rect" coords="90,0,165,96" href="../upt/index.htm"><area shape="rect" coords="168,1,253,107" href="../mac/index.htm"><area shape="rect" coords="255,0,335,97" href="../korn/index.htm"><area shape="rect" coords="337,0,415,109" href="../unixnut/index.htm"><area shape="rect" coords="417,0,512,122" href="../sedawk/index.htm"><area shape="rect" coords="514,0,605,105" href="../lunix/index.htm"><area shape="rect" coords="611,2,694,121" href="../vi/index.htm"></map></body></html>

⌨️ 快捷键说明

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