[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] #2219 canonicalized keyword and new UUID keyword documentation

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-04-01 16:52:23 CEST

John Peacock wrote:
[...]
> <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 six keywords,

Just five keywords in this version.

I offer the attached version which also fixes some indentation and re-words
some parts to make it clearer in my opinion.

As far as I know the associated source code patch has not been committed yet.
I'll see if I can help that on its way now.

- Julian

[[[
Change svn:keywords documentation to reflect required capitalization and define
canonical keyword values.

* en/book/ch07.xml
  (svn-ch-7-sect-2.3.4): Document that keywords are capitalization
    sensitive in files and describe the client canonicalization rules
    for svn:keywords.
]]]
            
Index: en/book/ch07.xml
===================================================================
--- en/book/ch07.xml (revision 1202)
+++ en/book/ch07.xml (working copy)
@@ -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) $

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Apr 1 16:53:40 2005

This is an archived mail posted to the Subversion Dev mailing list.