[svnbook] r4189 committed - * en/book/ch09-reference.xml...

svnbook at googlecode.com svnbook at googlecode.com
Thu Nov 10 10:05:56 CST 2011


Revision: 4189
Author:   cmpilato at gmail.com
Date:     Thu Nov 10 08:05:17 2011
Log:      * en/book/ch09-reference.xml
   (svn.ref.svn.c.cat): Eliminate a truly forced example.  Add
     admonishment of a common mistake folks make.

http://code.google.com/p/svnbook/source/detail?r=4189

Modified:
  /trunk/en/book/ch09-reference.xml

=======================================
--- /trunk/en/book/ch09-reference.xml	Thu Nov 10 07:52:37 2011
+++ /trunk/en/book/ch09-reference.xml	Thu Nov 10 08:05:17 2011
@@ -1267,31 +1267,56 @@
              <screen>
  $ svn cat http://svn.red-bean.com/repos/test/readme.txt
  This is a README file.
-You should read this.
+Don't bother reading it.  The boss is a knucklehead.
+
+INSTRUCTIONS
+============
+
+Step 1:  Do this.
+
+Step 2:  Do that.
  $
  </screen>
            </informalexample>

-          <tip>
-            <para>If your working copy is out of date (or you have
-              local modifications) and you want to see the
-              <literal>HEAD</literal> revision of a file in your
-              working copy, <command>svn cat -r HEAD  
<replaceable>FILENAME</replaceable></command> will
-              automatically fetch the <literal>HEAD</literal> revision
-              of the specified path:</para>
-          </tip>
+          <para>You can view specific versions of files, too.</para>

            <informalexample>
              <screen>
-$ cat foo.c
-This file is in my local working copy
-and has changes that I've made.
-$ svn cat -r HEAD foo.c
-Latest revision fresh from the repository!
+$ svn cat -r 3 http://svn.red-bean.com/repos/test/readme.txt
+This is a README file.
+
+INSTRUCTIONS
+============
+
+Step 1:  Do this.
+
+Step 2:  Do that.
  $
  </screen>
            </informalexample>
-
+
+          <note>
+            <para>You might develop a reflex action of
+              using <command>svn cat</command> to view your working
+              file contents.  But keep in mind that the default peg
+              revision for <command>svn cat</command> when used on a
+              working copy file target is <literal>BASE</literal>, the
+              unmodified base revision of that file.  Don't be
+              surprised when a simple <userinput>svn cat
+              /path/to/file</userinput> invocation fails to display
+              your local modifications to that file!</para>
+          </note>
+
+          <tip>
+            <para>If your working copy is out of date (or you have
+              local modifications) and you want to see the
+              <literal>HEAD</literal> revision of a file in your
+              working copy, use the <option>--revision</option>
+              (<option>-r</option>) option:  <userinput>svn cat -r
+              HEAD <replaceable>FILENAME</replaceable></userinput></para>
+          </tip>
+
          </refsect1>
        </refentry>





More information about the svnbook-dev mailing list