[svnbook commit] r1268 - trunk/src/en/book
kfogel
svnbook-dev at red-bean.com
Fri May 6 16:04:19 CDT 2005
Author: kfogel
Date: Fri May 6 16:04:18 2005
New Revision: 1268
Modified:
trunk/src/en/book/ch09.xml
Log:
* src/en/book/ch09.xml
(svnserve): New reference section. Thanks to Max Bowsher for review
and Fitz for markup help.
Modified: trunk/src/en/book/ch09.xml
==============================================================================
--- trunk/src/en/book/ch09.xml (original)
+++ trunk/src/en/book/ch09.xml Fri May 6 16:04:18 2005
@@ -5404,6 +5404,134 @@
</sect1>
+ <!-- ================================================================= -->
+ <!-- ======================== SECTION 5 ============================== -->
+ <!-- ================================================================= -->
+ <sect1 id="svn-ch-9-sect-5">
+
+ <title><command>svnversion</command></title>
+
+ <refentry id="svn-ch-9-sect-5.1">
+ <refnamediv>
+ <refname>svnversion</refname>
+ <refpurpose>Summarize the local revision(s) of a working
+ copy.</refpurpose>
+ </refnamediv>
+
+ <refsect1 id="svn-ch-9-sect-5.1.1">
+ <title>Synopsis</title>
+ <programlisting>svnversion [OPTIONS] WC_PATH [TRAIL_URL]</programlisting>
+ </refsect1>
+
+ <refsect1 id="svn-ch-9-sect-5.1.2">
+ <title>Description</title>
+
+ <para><command>svnversion</command> is a program for
+ summarizing the revision mixture of a working copy. The
+ resultant revision number, or revision range, is written to
+ standard output.</para>
+
+ <para>TRAIL_URL, if present, is the trailing portion of the
+ URL used to determine if WC_PATH itself is switched
+ (detection of switches within WC_PATH does not rely on
+ TRAIL_URL).</para>
+
+ </refsect1>
+
+ <refsect1 id="svn-ch-9-sect-5.1.3">
+ <title>Switches</title>
+
+ <para>Like <command>svnserve</command>,
+ <command>svnversion</command> has no subcommands, it only
+ has switches.</para>
+
+ <variablelist>
+
+ <varlistentry>
+ <term><option>--no-newline</option> (<option>-n</option>)</term>
+ <listitem>
+ <para>Omit the usual trailing newline from the output.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--committed</option> (<option>-c</option>)</term>
+ <listitem>
+ <para>Use the last-changed revisions rather than the
+ current (i.e., highest locally available) revisions.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--help</option> (<option>-h</option>)</term>
+ <listitem>
+ <para>Print a help summary.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--version</option></term>
+ <listitem>
+ <para>Print the version of <command>svnversion</command>
+ and exit with no error.</para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+ </refsect1>
+
+ <refsect1 id="svn-ch-9-sect-5.1.4">
+ <title>Examples</title>
+
+ <para>If the working copy is all at the same revision (for
+ example, immediately after an update), then that revision is
+ printed out:</para>
+
+ <screen>$ svnversion .
+4168</screen>
+
+ <para>You can add TRAIL_URL to show that the working copy is
+ not switched from what you expect:</para>
+
+ <screen>$ svnversion . /repos/svn/trunk
+4168</screen>
+
+ <para>For a mixed-revision working copy, the range of
+ revisions present is printed:</para>
+
+ <screen>$ svnversion .
+4123:4168</screen>
+
+ <para>If the working copy contains modifications, a trailing
+ "M" is added:</para>
+
+ <screen>$ svnversion .
+4168M</screen>
+
+ <para>If the working copy is switched, a trailing "S" is
+ added:</para>
+
+ <screen>$ svnversion .
+4168S</screen>
+
+ <para>Thus, here is a mixed-revision, switched working copy
+ containing some local modifications:</para>
+
+ <screen>$ svnversion .
+4212:4168MS</screen>
+
+ <para>If invoked on a directory that is not a working copy,
+ <command>svnversion</command> assumes it is an exported
+ working copy and prints "exported":</para>
+
+ <screen>$ svnversion .
+exported</screen>
+
+ </refsect1>
+
+ </refentry>
+ </sect1>
+
</chapter>
<!--
More information about the svnbook-dev
mailing list