This would not work in a NAnt build script because the svnversion command isn't recognized by the <svn /> task.
However it could work if a <exec /> task was used instead.
From: Stefan Sperling [mailto:stsp_at_elego.de]
Sent: Monday, June 15, 2009 11:49 AM
To: Georges Labrèche
Subject: Re: Filtering svn info output
On Mon, Jun 15, 2009 at 11:24:57AM -0400, Georges Labrèche wrote:
> Hello all!
> When executing the svn info command I'd like to filter the output so
> that we only display the Revision information.
> This would greatly facilitate parsing out that information in my build script.
> Is this possible?
You might rather want to use svnversion:
usage: svnversion [OPTIONS] [WC_PATH [TRAIL_URL]]
Produce a compact 'version number' for the working copy path
WC_PATH. TRAIL_URL 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). The version number
is written to standard output. For example:
$ svnversion . /repos/svn/trunk
The version number will be a single number if the working
copy is single revision, unmodified, not switched and with
an URL that matches the TRAIL_URL argument. If the working
copy is unusual the version number will be more complex:
4123:4168 mixed revision working copy
4168M modified working copy
4123S switched working copy
4123P partial working copy, from a sparse checkout
4123:4168MS mixed revision, modified, switched working copy
If invoked on a directory that is not a working copy, an
exported directory say, the program will output 'exported'.
If invoked without arguments WC_PATH will be the current directory.
-n [--no-newline] : do not output the trailing newline
-c [--committed] : last changed rather than current revisions
-h [--help] : display this help
--version : show program version information
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-06-15 18:03:03 CEST