[svnbook commit] r1203 - trunk/src/en/book
julianfoad at red-bean.com
julianfoad at red-bean.com
Fri Apr 1 09:31:37 CST 2005
Author: julianfoad
Date: Fri Apr 1 09:31:36 2005
New Revision: 1203
Modified:
trunk/src/en/book/ch07.xml
Log:
Update svn:keywords documentation to reflect the changes made by r13369 of
the source code.
* en/book/ch07.xml
(svn-ch-7-sect-2.3.4): Document that keywords are capitalization-
sensitive in files, describe the client canonicalization rules
for svn:keywords and define the canonical keyword names.
Modified: trunk/src/en/book/ch07.xml
==============================================================================
--- trunk/src/en/book/ch07.xml (original)
+++ trunk/src/en/book/ch07.xml Fri Apr 1 09:31:36 2005
@@ -1343,42 +1343,50 @@
formatted as
<literal>$</literal><replaceable>KeywordName</replaceable><literal>$</literal>.</para>
+ <para>All keywords are case-sensitive where they appear as
+ anchors in files: you must use the correct capitalization in
+ order for the keyword to be expanded. When setting the
+ value of the <literal>svn:keywords</literal> property,
+ however, the Subversion client will automatically normalize
+ each keyword name to one of the canonical values listed
+ below, removing duplicate aliases and correcting
+ capitalization.</para>
+
<para>Subversion defines the list of keywords available for
- substitution. That list contains the following five
- keywords, some of which have shorter aliases that you can
- also use:</para>
+ substitution. That list contains the following five keywords,
+ some of which have aliases that you can also use:</para>
<variablelist>
<varlistentry>
- <term><literal>LastChangedDate</literal></term>
+ <term><literal>Date</literal></term>
<listitem>
<para>This keyword describes the last time the file was
known to have been changed in the repository, and
- looks something like <literal>$LastChangedDate:
+ looks something like <literal>$Date:
2002-07-22 21:42:37 -0700 (Mon, 22 Jul 2002)
- $</literal>. It may be abbreviated as
- <literal>Date</literal>.</para>
+ $</literal>. It may also be specified as
+ <literal>LastChangedDate</literal>.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><literal>LastChangedRevision</literal></term>
+ <term><literal>Revision</literal></term>
<listitem>
<para>This keyword describes the last known revision in
which this file changed in the repository, and looks
- something like <literal>$LastChangedRevision: 144
- $</literal>. It may be abbreviated as
- <literal>Revision</literal> or
+ something like <literal>$Revision: 144 $</literal>.
+ It may also be specified as
+ <literal>LastChangedRevision</literal> or
<literal>Rev</literal>.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><literal>LastChangedBy</literal></term>
+ <term><literal>Author</literal></term>
<listitem>
<para>This keyword describes the last known user to
change this file in the repository, and looks
- something like <literal>$LastChangedBy: harry
- $</literal>. It may be abbreviated as
- <literal>Author</literal>.</para>
+ something like <literal>$Author: harry $</literal>.
+ It may also be specified as
+ <literal>LastChangedBy</literal>.</para>
</listitem>
</varlistentry>
<varlistentry>
@@ -1388,7 +1396,7 @@
version of the file in the repository, and looks
something like <literal>$HeadURL:
http://svn.collab.net/repos/trunk/README $</literal>.
- It may be abbreviated as
+ It may also be specified as
<literal>URL</literal>.</para>
</listitem>
</varlistentry>
@@ -1443,7 +1451,7 @@
<literal>LastChangedDate</literal> keyword.</para>
<screen>
-$ svn propset svn:keywords "LastChangedDate Author" weather.txt
+$ svn propset svn:keywords "Date Author" weather.txt
property 'svn:keywords' set on 'weather.txt'
$
</screen>
@@ -1488,6 +1496,15 @@
<literal>Rev</literal> keyword was not substituted because
we didn't ask for it to be.</para>
+ <para>Note also that we set the <literal>svn:keywords</literal>
+ property to "Date Author" yet the keyword anchor used the
+ alias <literal>$LastChangedDate$</literal> and still
+ expanded correctly. In addition, had we set the
+ <literal>svn:keywords</literal> property to "LastChangedDate
+ Author" it would have actually been stored in the canonical
+ form "Date Author" which you could check using the
+ <command>svn proplist</command> command.</para>
+
<screen>
Here is the latest report from the front lines.
$LastChangedDate: 2002-07-22 21:42:37 -0700 (Mon, 22 Jul 2002) $
More information about the svnbook-dev
mailing list