You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Frederic Duarte <fr...@oneaccess-net.com> on 2006/05/17 09:00:26 UTC
Processing localized svn info
Hello all,
Context
I can read from http://subversion.tigris.org/ the following Subversion's
Feature :
/- Parseable output
*All* output of the Subversion command-line client is carefully designed
to be both human readable and automatically parseable; scriptability is
a high priority.
/
That's one of the most important feature for us, as we want to
automatize lot of things.
But it seems that this feature is not really true, or am I trying to get
informations the wrong way ?
Here is my problem :
I need to process some informations displayed by "svn info".
1) the plain text displayed by svn info is not so easy to parse
2) the svn client is automatically localized -> the plain text cannot be
parsed
3) the text displayed by svn info changes depending on the TARGET (ex:
the repository root is not displayed when TARGET is a working copy)
Question
How could I easily get/parse these informations ?
Thank you for your suggestions.
--
Frédéric DUARTE
Software production process
OneAccess Networks R&D
Re: Processing localized svn info
Posted by Andy Levy <an...@gmail.com>.
On 5/17/06, Ryan Schmidt <su...@ryandesign.com> wrote:
>
> On May 17, 2006, at 11:00, Frederic Duarte wrote:
>
> > Here is my problem :
> > I need to process some informations displayed by "svn info".
> > 1) the plain text displayed by svn info is not so easy to parse
>
> Oh, it's not that bad: split on the first ": " and you've got your
> set of name/value pairs.
>
> If that's not enough, the --xml switch gives you XML output which you
> can parse or transform with XSLT.
Just a quick note on that. --xml was only introduced as a switch for
svn info with the release of 1.3.
But now that I know that, this may be my excuse to upgrade to 1.3, at
least on my desktop where I run my log reports.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Processing localized svn info
Posted by Ryan Schmidt <su...@ryandesign.com>.
On May 17, 2006, at 11:00, Frederic Duarte wrote:
> Here is my problem :
> I need to process some informations displayed by "svn info".
> 1) the plain text displayed by svn info is not so easy to parse
Oh, it's not that bad: split on the first ": " and you've got your
set of name/value pairs.
If that's not enough, the --xml switch gives you XML output which you
can parse or transform with XSLT.
> 2) the svn client is automatically localized -> the plain text
> cannot be parsed
The first line of your script can set the locale to anything you
like, for example:
LANG=en_US
> 3) the text displayed by svn info changes depending on the TARGET
> (ex: the repository root is not displayed when TARGET is a working
> copy)
But the repository root is shown, even for working copies. Are you
using the latest version of Subversion, 1.3.1?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org