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

[BOOK PATCH] Re: revision no of the WC

From: <kfogel_at_collab.net>
Date: 2005-05-04 17:06:22 CEST

anita kulshreshtha <a_kulshre@yahoo.com> writes:
> Thanks, svnversion is what I need. It is not
> documented in
> http://svnbook.red-bean.com/en/1.1/svn-book.html#svn-ch-9.
> Is there any other reference, I should be using?

That's the main one.

It should be in that list. Book authors, here's a patch. I don't
even know if this compiles (I'm not set up here to build the book),
but markup problems aside, I think the material itself is probably
about right.

[[[
* src/en/book/ch09.xml
  (svnserve): New reference section.
]]]

Index: src/en/book/ch09.xml
===================================================================
--- src/en/book/ch09.xml (revision 1261)
+++ src/en/book/ch09.xml (working copy)
@@ -5404,6 +5404,108 @@
 
   </sect1>
 
+ <!-- ================================================================= -->
+ <!-- ======================== SECTION 5 ============================== -->
+ <!-- ================================================================= -->
+ <sect1 id="svn-ch-9-sect-5">
+
+ <title><command>svnversion</command></title>
+
+ <sect2 id="svn-ch-9-sect-5.1">
+ <title>Synopsis</title>
+ <programlisting>svnversion [OPTIONS] WC_PATH [TRAIL_URL]</programlisting>
+ </sect2>
+
+ <sect2 id="svn-ch-9-sect-5.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>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>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>
+
+ </sect2>
+
+ <sect2 id="svn-ch-9-sect-5.3">
+ <title><command>svnversion</command> 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>
+
+ </sect2>
+
+ </sect1>
+
 </chapter>
 
 <!--

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed May 4 17:41:03 2005

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

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