[svnbook commit] r2609 - trunk/src/en/book

sussman noreply at red-bean.com
Fri Jan 5 00:19:31 CST 2007

Author: sussman
Date: Fri Jan  5 00:19:30 2007
New Revision: 2609


* ch-advanced-topics.html: add new sidebar, 'where's 0'

Modified: trunk/src/en/book/ch-advanced-topics.xml
--- trunk/src/en/book/ch-advanced-topics.xml	(original)
+++ trunk/src/en/book/ch-advanced-topics.xml	Fri Jan  5 00:19:30 2007
@@ -1816,8 +1816,33 @@
       <title>Where's $GlobalRev$?</title>
-      <para>### TODO:  Write me</para>
+      <para>New users are often confused by how
+        the <literal>$Rev$</literal> keyword works.  Since the
+        repository has a single, globally increasing revision number,
+        many people assume that this value will be reflected by
+        the <literal>$Rev$</literal> keyword.  Not so!  The value of
+        this keyword is only expanded to show the last revision in
+        which the file changed.  While files don't really have their
+        own revision numbers, this keyword value still represents a
+        unique version of the file.  It's only updated when the file
+        itself changes.</para>
+      <para>A common reaction to this news is frustration: <quote>Why
+          isn't there a <literal>$GlobalRev$</literal> keyword then?
+          I want to include the global revision in my file as an
+          identifier for my whole project.</quote> The answer is in
+          two parts.  First, a global-revision keyword doesn't exist
+          because it would be too inefficient to implement.  After
+          every single <command>svn update</command>, the client would
+          have to scan the entire working copy, potentially looking to
+          expand the keyword in every file!  Second,
+          it <emphasis>is</emphasis> possible to embed project-wide
+          revision numbers into a file.
+          The <command>svnversion</command> tool was designed just for
+          this purpose.  Have your build-system run this tool on your
+          working copy, and embed the resulting value in your file.
+          More information on <command>svnversion</command> is
+          available at <xref linkend="svn.ref.svnversion"/>.</para>
     <para>Subversion 1.2 introduced a new variant of the keyword

More information about the svnbook-dev mailing list