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

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

From: John Peacock <jpeacock_at_rowman.com>
Date: 2005-03-20 15:53:53 CET

As promised, here is a patch to reflect the alread applied #2219 canonical
keyword changes, as well as document the new UUID keyword (as included in the
keywords-as-hash patch that has not been applied yet).

[[[

Change svn:keywords documentation to reflect required capitalization and define
canonical keyword values, including new UUID keyword.

* en/book/ch07.xml
   (svn-ch-7-sect-2.3.4): emphasize that keywords are capitalization-sensitive in
     files and describe the client canonicalization rules. Document new UUID
     keyword.

]]]

John

p.s. is anyone else bothered by the fact that both svn:keywords and "revision
keywords" (being the aliases HEAD, BASE, etc) share the same term? Is it too
late to change the latter to be "revision aliases" instead or something???

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747

--- en/book/ch07.xml (revision 13018)
+++ en/book/ch07.xml (local)
@@ -1343,42 +1343,48 @@
           formatted as
           <literal>$</literal><replaceable>KeywordName</replaceable><literal>$</literal>.</para>
 
+ <para>All keywords in files are case-sensitive; you must use the
+ correct capitalization in order for the keyword to be expanded.
+ When <emphasis>setting</emphasis> the <literal>svn:keywords</literal>
+ property, the Subversion client will automatically normalize the
+ values to one of the canonical values listed below, including
+ 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 six 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 +1394,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>
@@ -1403,6 +1409,13 @@
                 148 on the evening of July 28, 2002 by the user
                 <literal>sally</literal>.</para>
             </listitem>
+ <term><literal>UUID</literal></term>
+ <para>This keyword displays the repository's
+ <emphasis>U</emphasis>niversal <emphasis>U</emphasis>nique
+ <emphasis>ID</emphasis>entifier. Its substitution looks
+ something like <literal>$UUID:
+ 01234567-89ab-cdef-89ab-cdef01234567 $</literal>.</para>
+ </listitem>
           </varlistentry>
         </variablelist>
 
@@ -1443,7 +1456,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 +1501,14 @@
           <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
+ <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) $
=== book/ch07.xml
==================================================================

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Mar 20 15:52:26 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.