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

📄 ch19_03.htm

📁 unix基础教程
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<html><head><title>General RCS Specifications (UNIX in a Nutshell: System V Edition)</title><link rel="stylesheet" type="text/css" href="../style/style1.css" /><meta name="DC.Creator" content="Arnold Robbins" /><meta name="DC.Format" content="text/xml" scheme="MIME" /><meta name="DC.Language" content="en-US" /><meta name="DC.Publisher" content="O'Reilly &amp; Associates, Inc." /><meta name="DC.Source" scheme="ISBN" content="1-56592-427-4" /><meta name="DC.Subject.Keyword" content="stuff" /><meta name="DC.Title" content="UNIX in a Nutshell: System V Edition" /><meta name="DC.Type" content="Text.Monograph" /></head><body bgcolor="#ffffff"><img src="gifs/smbanner.gif" usemap="#banner-map" border="0" alt="Book Home" /><map name="banner-map"><area shape="rect" coords="1,-2,616,66" href="index.htm" alt="Book Title" /><area shape="rect" coords="629,-11,726,25" href="jobjects/fsearch.htm" alt="Search this book" /></map><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="ch19_02.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td align="center" valign="top" width="228" /><td align="right" valign="top" width="228"><a href="ch19_04.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr></table></div><h2 class="sect1">19.3. General RCS Specifications</h2><p>This section discusses:</p><ul><li><p>Keyword substitution</p></li><li><p>Keywords</p></li><li><p>Example values</p></li><li><p>Revision numbering</p></li><li><p>Specifying the date</p></li><li><p>Specifying states</p></li><li><p>Standard options and environment variables</p></li></ul><a name="unut-ch-19-sect-3.1" /><div class="sect2"><h3 class="sect2">19.3.1. Keyword Substitution</h3><p><a name="IXT-19-123557" /><a name="IXT-19-123558" /><a name="IXT-19-123559" />RCS lets you place keyword variables in your working files.These variables are later expanded into revision notes.You can then use the notes either as embedded comments in the input fileor as text strings that appear when the output is printed.To create revision notes via keyword substitution,follow this procedure:</p><ol><li><p>In your working file, type any of the keywords listed below.</p></li><li><p>Check the file in.</p></li><li><p>Check the file out again.  Upon checkout, the <tt class="literal">co</tt> command expands each keyword to include its value.  That is, <tt class="literal">co</tt>replaces instances of:</p><blockquote><pre class="code"><tt class="userinput"><b>$</b></tt><em class="replaceable"><tt>keyword</tt></em><tt class="userinput"><b>$</b></tt></pre></blockquote><p>with:</p><blockquote><pre class="code"><tt class="userinput"><b>$</b></tt><em class="replaceable"><tt>keyword</em><tt class="userinput"><b>:</b></tt><em class="replaceable">value</tt></em><tt class="userinput"><b> $</b></tt>.</pre></blockquote></li><li><p>Subsequent check-in and check-out of a file updates anyexisting keyword values.  Unless otherwise noted below,existing values are replaced by new values.</p></li></ol><p>Many commands have a <tt class="literal">-k</tt> option thatprovides considerable flexibility during keyword substitution.</p></div><a name="unut-ch-19-sect-3.2" /><div class="sect2"><h3 class="sect2">19.3.2. Keywords</h3><table border="1" cellpadding="3"><tr><td><tt class="literal">$Author: ellie $</tt></td><td><p>Username of person who checked in the revision.</p></td></tr><tr><td><tt class="literal">$Date: 2002/11/08 17:52:39 $</tt></td><td><p><a name="IXT-19-123560" />Date and time of check-in.<a name="IXT-19-123561" /><a name="IXT-19-123562" /><a name="IXT-19-123563" /></p></td></tr><tr><td><tt class="literal">$Header: /work/online/cdtest/unix_3/unixnut/RCS/ch19_03.htm,v 1.2 2002/11/08 17:52:39 ellie Exp ellie $</tt></td><td><p>A title that includes the RCS file's full pathname,revision number, date, author, state, and (if locked) the person who lockedthe file.<a name="IXT-19-123564" /></p></td></tr><tr><td><tt class="literal">$Id: ch19_03.htm,v 1.2 2002/11/08 17:52:39 ellie Exp ellie $</tt></td><td><p>Same as <tt class="literal">$Header: /work/online/cdtest/unix_3/unixnut/RCS/ch19_03.htm,v 1.2 2002/11/08 17:52:39 ellie Exp ellie $</tt>,but exclude the full pathname of the RCS file.<a name="IXT-19-123565" /></p></td></tr><tr><td><tt class="literal">$Locker: ellie $</tt></td><td><p>Username of person who locked the revision.If the file isn't locked, this value is empty.<a name="IXT-19-123566" /></p></td></tr><tr><td><tt class="literal">$Log: ch19_03.htm,v $<tr><td><tt class="literal">Revision 1.2  2002/11/08 17:52:39  ellie<tr><td><tt class="literal">fixed entities<tr><td><tt class="literal"><tr><td><tt class="literal">Revision 1.1  2002/11/04 21:32:21  ellie<tr><td><tt class="literal">Initial revision<tr><td><tt class="literal"></tt></td><td><p>The message that was typed during check-in to describe the file,preceded by the RCS filename, revision number, author, and date.Log messages accumulate rather than being overwritten.</p><p>RCS uses the &#8220;comment leader&#8221; of the <tt class="literal">$Log: ch19_03.htm,v $<p>RCS uses the &#8220;comment leader&#8221; of the <tt class="literal">Revision 1.2  2002/11/08 17:52:39  ellie<p>RCS uses the &#8220;comment leader&#8221; of the <tt class="literal">fixed entities<p>RCS uses the &#8220;comment leader&#8221; of the <tt class="literal"><p>RCS uses the &#8220;comment leader&#8221; of the <tt class="literal">Revision 1.1  2002/11/04 21:32:21  ellie<p>RCS uses the &#8220;comment leader&#8221; of the <tt class="literal">Initial revision<p>RCS uses the &#8220;comment leader&#8221; of the <tt class="literal"></tt> line for thelog messages left in the file.  The comment leader stored inthe RCS file is useful only for exchanging files with olderversions of RCS.</p></td></tr><tr><td><tt class="literal">$Name:  $</tt></td><td><p>The symbolic name used to check in the revision,if any.<a name="IXT-19-123567" /></p></td></tr><tr><td><tt class="literal">$RCSfile: ch19_03.htm,v $</tt></td><td><p>The RCS filename, without its pathname.<a name="IXT-19-123568" /></p></td></tr><tr><td><tt class="literal">$Revision: 1.2 $</tt></td><td><p>The assigned revision number.<a name="IXT-19-123569" /></p></td></tr><tr><td><tt class="literal">$Source: /work/online/cdtest/unix_3/unixnut/RCS/ch19_03.htm,v $</tt></td><td><p>The RCS filename, including its pathname.<a name="IXT-19-123570" /></p></td></tr><tr><td><tt class="literal">$State: Exp $</tt></td><td><p>The state assigned by the <tt class="literal">-s</tt> option of <tt class="literal">ci</tt> or <tt class="literal">rcs</tt>.<a name="IXT-19-123571" /></p></td></tr></table><p></div><a name="unut-ch-19-sect-3.3" /><div class="sect2"><h3 class="sect2">19.3.3. Example Values</h3><p>Let's assume that the file<tt class="literal">/projects/new/chapter3</tt> has been checked in and outby a user named <tt class="literal">daniel</tt>.  Here's what keyword substitution produces for each keyword, for the second revision of the file:</p><blockquote><pre class="code">$Author: ellie $$Date: 2002/11/08 17:52:39 $$Header: /project/new/chapter3,v 1.2 92/03/18/ 17:51:36 daniel \     Exp Locker: daniel $            $Id: cahpter3,v 1.2 1992/03/18 17:51:36 daniel Exp Locker:daniel $$Locker: ellie $$Log: ch19_03.htm,v $Revision 1.2  2002/11/08 17:52:39  elliefixed entitiesRevision 1.1  2002/11/04 21:32:21  ellieInitial revision# Revision 1.2  92/03/18  17:51:36  daniel# Added section on error-handling# # Revision 1.1  92/03/18  16:49:59  daniel# Initial revision# $Name:  $$RCSfile: ch19_03.htm,v $$Revision: 1.2 $$Source: /work/online/cdtest/unix_3/unixnut/RCS/ch19_03.htm,v $$State: Exp $</pre></blockquote></div>

⌨️ 快捷键说明

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